Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:51

0001 #!/usr/bin/env python
0002 #
0003 # Copyright (c) 2019 Opticks Team. All Rights Reserved.
0004 #
0005 # This file is part of Opticks
0006 # (see https://bitbucket.org/simoncblyth/opticks).
0007 #
0008 # Licensed under the Apache License, Version 2.0 (the "License"); 
0009 # you may not use this file except in compliance with the License.  
0010 # You may obtain a copy of the License at
0011 #
0012 #   http://www.apache.org/licenses/LICENSE-2.0
0013 #
0014 # Unless required by applicable law or agreed to in writing, software 
0015 # distributed under the License is distributed on an "AS IS" BASIS, 
0016 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
0017 # See the License for the specific language governing permissions and 
0018 # limitations under the License.
0019 #
0020 
0021 
0022 import logging
0023 log = logging.getLogger(__name__)
0024 import numpy as np, math 
0025 
0026 import matplotlib.pyplot as plt
0027 from opticks.ana.torus_hyperboloid import Tor, Hyp
0028 
0029 from opticks.ana.x018 import x018
0030 from opticks.ana.x019 import x019
0031 from opticks.ana.x020 import x020
0032 from opticks.ana.x021 import x021
0033 
0034 
0035 if __name__ == '__main__':
0036     plt.ion()
0037     fig = plt.figure(figsize=(6,5.5))
0038 
0039 
0040     plt.title("xplt")
0041 
0042     x_018 = x018()
0043     x_019 = x019()
0044     x_020 = x020()
0045     x_021 = x021()
0046 
0047     y_018 = x_018.spawn_rationalized() 
0048     y_019 = x_019.spawn_rationalized() 
0049     y_020 = x_020.spawn_rationalized() 
0050     y_021 = x_021.spawn_rationalized() 
0051 
0052     xx = [x_018, x_019, x_020, x_021 ]
0053     yy = [y_018, y_019, y_020, y_021 ]
0054     #yy = [y_020]
0055 
0056     ax = fig.add_subplot(111)
0057     ax.set_ylim([-350,200])
0058     ax.set_xlim([-300,300])
0059 
0060     for x in xx+yy:
0061         for pt in x.root.patches():
0062             print "pt ", pt
0063             ax.add_patch(pt)
0064         pass
0065     pass 
0066 
0067     fig.show()
0068 
0069 
0070 
0071 """
0072     ax.scatter( p[0], p[1] , marker="*")
0073     ax.scatter( -p[0], p[1] , marker="*" )
0074 
0075     ax.plot( [R, p[0]], [z0, p[1]] )
0076     ax.plot( [-R, -p[0]], [z0, p[1]] )
0077 
0078     ax.plot( [R-r, p[0]], [z0, p[1]] )
0079     ax.plot( [-R+r, -p[0]], [z0, p[1]] )
0080 
0081     ax.plot(  tr, tz )
0082     ax.plot( -tr, tz )
0083 
0084     ax.plot(  hr, tz , linestyle="dashed")
0085     ax.plot( -hr, tz , linestyle="dashed")
0086 """