def orbit(pos,velocity,time_step,nr_steps):
"""From the given arguments (pos, velocity, time_step, nr_steps)
the function produces a list of position vectors.
"""
def plot_orbit(orbit_data):
"""This function adds the trajectory given by the orbit_data to the visual
scene. The default colour is white, however this can be altered by entering
a colour parameter.
"""
a = len(orbit_data)
positions = [orbit_data[i][0:3] for i in range(a)]
traj = visual.curve(pos = positions, color = visual.color.white)
I've no idea if I'm even using the curve function correctly. Or if the array's in the right format =[
Name:
Anonymous2009-05-15 15:46
I mean, using the code tags.
Name:
Anonymous2009-05-15 15:50
Sorry
def orbit(pos,velocity,time_step,nr_steps):
"""From the given arguments (pos, velocity, time_step, nr_steps)
the function produces a list of position vectors.
"""
def plot_orbit(orbit_data):
"""This function adds the trajectory given by the orbit_data to the visual
scene. The default colour is white, however this can be altered by entering
a colour parameter.
"""
a = len(orbit_data)
positions = [orbit_data[i][0:3] for i in range(a)]
traj = visual.curve(pos = positions, color = visual.color.white)
I hope that works. Otherwise how do I code tag?
I'm such a noob =[
Name:
Anonymous2009-05-15 21:47
Wow, you really can write C code in any language.
Name:
Anonymous2009-05-16 2:43
>>8
it's a way of ensuring only those of a certain iq prerequesite can read and enjoy the code
Name:
Anonymous2009-05-16 3:09
>>9
I like how you left it ambiguous whether that prerequisite is large or small.
Name:
Anonymous2009-05-16 3:42
>>10
leaving it out is a way of ensuring only those of a certain iq prerequestite can read and enjoy the comment
Name:
Anonymous2009-05-16 5:38
>>8
Well, Python is a language based on C. So you would kind of expect that...
Name:
Anonymous2009-05-16 5:49
>>12
Ruby is a langauge written in C. So you would kind of expect that...
The program to run the Ruby language
Am I still being trolled?
Name:
Anonymous2009-05-16 11:29
>>18
Which, I believe is a text board on the aforementioned '4chan'. So please be quiet. Any post on any of the boards is still technically a post on 4chan. If you don't believe me look at the URL.
Name:
Anonymous2009-05-16 11:32
>>21
Fuck the 4chan label. We were distinct and separate from 4chan when we started and we wish to be the same in spirit.
Name:
Anonymous2009-05-16 11:52
>>17
Somebody doesn't understand the concept of Turing completeness.
What is Ruby written in, if not C?
>>23
Hahaha, you must be kidding. Ruby is just too SLOW to be written in C.
Name:
Anonymous2009-05-16 15:12
>>20
Matz' Runtime Interpreter for his Ruby language is written in 'C'. What is most lulzworthy about it is that the JRuby runtime (written in Java) is not as SLOW AS FUCK as the 'C' version it copied.
Ruby 1.8 kept the parse tree in memory and evaluated that, rather than compiling to bytecode, IIRC[citation needed]. It would explain why it was SLOW AS FUCK. I don't know how Ruby 1.9 compares to JRuby though.
Name:
Anonymous2009-05-16 19:49
>>26
yeah 1,9 is like totally aewsome i hear but ive not used because soem gems i use are totally 1.8 desu desu kawaii watashi lol
Name:
Anonymous2009-07-12 2:55
From being reserved characters and BEGIN END When I learnt?