Click here to Skip to main content
15,886,625 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
Questionsockets and servers for game hosting Pin
shahab9612-Jan-11 17:14
shahab9612-Jan-11 17:14 
QuestionRe: sockets and servers for game hosting Pin
Murlakatamus21-Jan-11 21:30
Murlakatamus21-Jan-11 21:30 
AnswerRe: sockets and servers for game hosting Pin
shahab9621-Jan-11 22:15
shahab9621-Jan-11 22:15 
AnswerRe: sockets and servers for game hosting Pin
etkid8425-Aug-11 3:47
etkid8425-Aug-11 3:47 
GeneralRe: sockets and servers for game hosting Pin
shahab9625-Aug-11 13:25
shahab9625-Aug-11 13:25 
QuestionCookies Pin
SRJ9210-Jan-11 15:44
SRJ9210-Jan-11 15:44 
AnswerRe: Cookies Pin
Luc Pattyn10-Jan-11 17:59
sitebuilderLuc Pattyn10-Jan-11 17:59 
Questionpython just for fun Pin
shahab9610-Jan-11 5:04
shahab9610-Jan-11 5:04 
I have no idea where i should post this, so whatever.
here is a python program i made using vpython. I it must be downloaded before the program works. Also the program is made in python 3.1. It is a (very) innaccurate simulation of the milkyway.....mostly just created for the hell of it.

from visual import *

milkyway = frame()
sun_frame = frame(frame = milkyway)
mercury_frame= frame(frame = milkyway)
venus_frame= frame(frame = milkyway)
earth_frame= frame(frame = milkyway)
mars_frame= frame(frame = milkyway)
jupiter_frame= frame(frame = milkyway)
saturn_frame= frame(frame = milkyway)
uranus_frame= frame(frame = milkyway)
neptune_frame= frame(frame = milkyway)
pluto_frame= frame(frame = milkyway)

sun = sphere(frame = sun_frame, pos = (0, 0, 0), radius = 10, color = color.yellow, material = materials.emissive)
mercury = sphere(frame = mercury_frame, pos = (15, 0, 0), radius = 0.5, color = color.red, material = materials.rough)
venus = sphere(frame = venus_frame, pos = (25, 0, 0), radius = 1, color = color.orange, material = materials.emissive)
earth = sphere(frame = earth_frame, pos = (33, 0, 0), radius = 2, material = materials.earth)
mars = sphere(frame = mars_frame, pos = (39, 0, 0), color = color.red, material = materials.rough)
jupiter = sphere(frame = jupiter_frame, pos = (50, 0, 0), radius = 3, color = color.orange, material = materials.emissive)
saturn = sphere(frame = saturn_frame, pos = (60, 0, 0), radius = 2.5, color = color.magenta, material = materials.rough)
saturns_rings = ring(frame = saturn.frame, pos = saturn.pos, axis = (-1, 1, 0), radius = 4)
uranus = sphere(frame = uranus_frame, pos = (75, 0, 0), radius = 2.15, color = color.cyan, material = materials.emissive)
neptune = sphere(frame = neptune_frame, pos = (83, 0, 0), radius = 1.75, color = color.blue, material = materials.rough)
pluto = sphere(frame = pluto_frame, pos = (90, 0, 0), color = color.blue, material = materials.emissive)

view = input('Would you like a <S>ide-view or a <O>verhead view?\n')
if view == 'o' or view == 'O':
       milkyway.rotate(angle = pi/4)
else:
       pass

def revolve_venus(venus):
       venus.frame.rotate(angle = pi/6, axis = (0, 1, 0), origin = sun.pos)

def revolve_mercury(mercury):
       mercury.frame.rotate(angle = pi/5, axis = (0, 1, 0), origin = sun.pos)

def revolve_earth(earth):
       earth.frame.rotate(angle = pi/7, axis = (0, 1, 0), origin = sun.pos)

def revolve_mars(mars):
       mars.frame.rotate(angle = pi/8, axis = (0, 1, 0), origin = sun.pos)

def revolve_jupiter(jupiter):
       jupiter.frame.rotate(angle = pi/10, axis = (0, 1, 0), origin = sun.pos)

def revolve_saturn(saturn):
       saturn.frame.rotate(angle = pi/12, axis = (0, 1, 0), origin = sun.pos)

def revolve_pluto(pluto):
       pluto.frame.rotate(angle = pi/20, axis = (0, 1, 0), origin = sun.pos)

def revolve_neptune(neptune):
       neptune.frame.axis.rotate(angle = pi/16, axis = (0, 1, 0), origin = sun.pos)

def revolve_uranus(uranus):
       uranus.frame.rotate(angle = pi/14, axis = (0, 1 , 0), origin = sun.pos)

def revolve_neptune(neptune):
       neptune.frame.rotate(angle = pi/16, axis = (0, 1, 0), origin = sun.pos)

def revolve_all_planets(mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto):
       while True:
              revolve_mercury(mercury)
              revolve_venus(venus)
              revolve_earth(earth)
              revolve_mars(mars)
              revolve_jupiter(jupiter)
              revolve_saturn(saturn)
              revolve_uranus(uranus)
              revolve_neptune(neptune)
              revolve_pluto(pluto)
              rate(10)

revolve_all_planets(mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto)


people should start to use vpython. it is much better then pyopengl! Cool | :cool:
JokeRe: python just for fun Pin
BC3Tech11-Jan-11 3:11
BC3Tech11-Jan-11 3:11 
JokeRe: python just for fun Pin
grgran11-Jan-11 5:38
grgran11-Jan-11 5:38 
GeneralRe: python just for fun Pin
shahab9612-Jan-11 4:42
shahab9612-Jan-11 4:42 
GeneralRe: python just for fun Pin
HimanshuJoshi12-Jan-11 17:12
HimanshuJoshi12-Jan-11 17:12 
AnswerRe: python just for fun Pin
Sterling Camden / independent consultant11-Jan-11 4:48
Sterling Camden / independent consultant11-Jan-11 4:48 
GeneralRe: python just for fun Pin
shahab9612-Jan-11 4:44
shahab9612-Jan-11 4:44 
GeneralRe: python just for fun Pin
cjoki12-Jan-11 4:47
cjoki12-Jan-11 4:47 
GeneralRe: python just for fun Pin
shahab9612-Jan-11 17:01
shahab9612-Jan-11 17:01 
AnswerRe: python just for fun Pin
HimanshuJoshi12-Jan-11 17:15
HimanshuJoshi12-Jan-11 17:15 
Questiondynamic dropdown list Pin
komanche9-Jan-11 23:53
komanche9-Jan-11 23:53 
AnswerRe: dynamic dropdown list Pin
Gerben Jongerius10-Jan-11 0:29
Gerben Jongerius10-Jan-11 0:29 
QuestionApplication Scope Array Pin
vb develop5-Jan-11 2:48
vb develop5-Jan-11 2:48 
AnswerRe: Application Scope Array Pin
cjoki5-Jan-11 10:42
cjoki5-Jan-11 10:42 
GeneralRe: Application Scope Array [modified] Pin
vb develop6-Jan-11 2:44
vb develop6-Jan-11 2:44 
GeneralRe: Application Scope Array Pin
cjoki6-Jan-11 4:53
cjoki6-Jan-11 4:53 
Questionhttp post response id capture Pin
0b4m44-Jan-11 22:54
0b4m44-Jan-11 22:54 
AnswerRe: http post response id capture Pin
cjoki5-Jan-11 4:54
cjoki5-Jan-11 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.