from visual import * #scene.stereo='redcyan' # set up for colored 3D glasses # right button mouse drag spins (Mac: option key + mouse) # double button mouse drag zooms (Mac: command key + mouse) ################# This stuff makes labeled coordinate axes ################# ## ## d = 25 #adjust length of axes as needed ## r = d*.008 #thickness of axes ## ## scene.background=color.white #this makes it easier to see when projected ## scene.x=scene.y=0 ## scene.width=scene.height=800 ## scene.range=1.2*d ## ## xaxis=cylinder(pos=vector(0,0,0),axis=vector(d,0,0),radius=r) ## yaxis=cylinder(pos=vector(0,0,0),axis=vector(0,d,0),radius=r) ## zaxis=cylinder(pos=vector(0,0,0),axis=vector(0,0,d),radius=r) ## ## label(pos=xaxis.pos+xaxis.axis,text='x',box=0) ## label(pos=yaxis.pos+yaxis.axis,text='y',box=0) ## label(pos=zaxis.pos+zaxis.axis,text='z',box=0) ## ## ############################################################################## scene.forward=(0, 0.8, -0.5) #look toward constellation # Plot the stars # Earth @ (0.0, 0.0, 0.0), (x, y, z) = light yrs from Earth, radius = arbitrary size Dubhe = sphere(pos = vector(12.2, 92.5, -48.2), radius = 1, color = color.yellow) Merak = sphere(pos = vector(11.2,66.6, -42.8), radius = 1, color = color.yellow) Phecda = sphere(pos = vector(1.5, 72.5, -53.3), radius = 1, color = color.yellow) Megrez = sphere(pos = vector(-2.3,54.5, -35.3), radius = 1, color = color.yellow) Alioth = sphere(pos = vector(-9.1,58.0, -38.1), radius = 1, color = color.yellow) Mizar = sphere(pos = vector(-18.0,72.0, -47.2), radius = 1, color = color.yellow) Alkaid = sphere(pos = vector(-61.6,159.3, -122.2), radius = 1, color = color.yellow) # "Connect the dots" Dubhe_Merak = cylinder(pos = Dubhe.pos, axis = Merak.pos - Dubhe.pos, radius = 0.2, color = color.blue) Merak_Phecda = cylinder(pos = Merak.pos, axis = Phecda.pos - Merak.pos, radius = 0.2, color = color.blue) Phecda_Megrez = cylinder(pos = Phecda.pos, axis = Megrez.pos - Phecda.pos, radius = 0.2, color = color.blue) Megrez_Alioth = cylinder(pos = Megrez.pos, axis = Alioth.pos - Megrez.pos, radius = 0.2, color = color.blue) Alioth_Mizar = cylinder(pos = Alioth.pos, axis = Mizar.pos - Alioth.pos, radius = 0.2, color = color.blue) Mizar_Alkaid = cylinder(pos = Mizar.pos, axis = Alkaid.pos - Mizar.pos, radius = 0.2, color = color.blue)