Use Non-Frames Version Previous Page Next Page
Signal Generators: Models and Emulations

planet

  ax,     planet     kmass1, kmass2, ksep, ix, iy, iz, ivx, ivy, ivz, idelta, ifriction
  ay, az

Description

planet simulates a planet orbiting in a binary star system. The outputs are the x, y and z coordinates of the orbiting planet. It is possible for the planet to achieve escape velocity by a close encounter with a star. This makes this system somewhat unstable.

Initialization

ix, iy, iz - the initial x, y and z coordinates of the planet

ivx, ivy, ivz - the initial velocity vector components for the planet.

idelta - the step size used to approximate the differential equation.

ifriction - a value for friction, which can used to keep the system from blowing up

Performance

kmass1 - the mass of the first star

kmass2 - the mass of the second star

ksep - determines the distance between the two stars

ax, ay, az - the output x, y, and z coodinates of the planet

Example

           instr 1
idur       =     p3
iamp       =     p4
km1        =     p5
km2        =     p6
ksep       =     p7
ix         =     p8
iy         =     p9
iz         =     p10
ivx        =     p11
ivy        =     p12
ivz        =     p13
ih         =     p14
ifric      =     p15

kamp       linseg 0, .002, iamp, idur-.004, iamp, .002, 0

ax, ay, az planet km1, km2, ksep, ix, iy, iz, ivx, ivy, ivz, ih, ifric

           outs   ax*kamp, ay*kamp

           endin


;   Sta  Dur  Amp   M1  M2  Sep  X   Y  Z  VX  VY  VZ   h   Frict
i1  0    1    5000  .5  .35 2.2  0  .1  0  .5  .6  -.1  .5  -0.1
i1  +    .    .     .5  0   0    0  .1  0  .5  .6  -.1  .5   0.1
i1  .    .    .     .4  .3  2    0  .1  0  .5  .6  -.1  .5   0.0
i1  .    .    .     .3  .3  2    0  .1  0  .5  .6  -.1  .5   0.1
i1  .    .    .     .25 .3  2    0  .1  0  .5  .6  -.1  .5   1.0
i1  .    .    .     .2  .5  2    0  .1  0  .5  .6  -.1  .1   1.0

Author

Hans Mikelson
December 1998
New in Csound version 3.50

Use Non-Frames Version Previous Page Next Page
Signal Generators: Models and Emulations