Announcement

Collapse
No announcement yet.

circular init script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • circular init script

    Has anybody perhaps worked out a circular init script for Phoenix? Something spherical or tubular for example?

    Apparently I've managed to forget all things math over the weekend...

  • #2
    well, open the script window, there are templates of the event functions inside.
    at the top is the function OnSimulationBegin, you have to put the initialization code here
    there is a commented text inside, it looks like
    /*
    xc=this.xc; yc=this.yc; zc=this.zc;
    for z=0 to zc do
    for y=0 to yc do
    for x=0 to xc do
    (
    )--*/
    uncomment it, i.e. remove the leading /*
    between the braced put the code
    dx=x-centerx
    dy=y-centery
    dz=z-centerz
    if dx*dx+dy*dy+dz*dz<radius*radius do ( write the initialization set functions here , for example a_sett x y z 2000 )
    this will init a spherical area, to convert it in a circle you have to use only two coordinates and fixed value for the third axis

    btw why script? you can use brush to initialize any region
    ______________________________________________
    VRScans developer

    Comment

    Working...
    X