I have created a sail with the mech sim feature in megapov 1.0. I want to
attach a complex rope and pulley system to the corners of the sail. I read
in the documentation that I can retrieve the location of the mass that
represents the corner of the sail. However try as I might, I cannot
figure out how to access this informatiuon correctly.
My request is for an example code showing the location of a specific mass
being assigned to a variable.
Thanks,
Tim
>My request is for an example code showing the location of a specific mass>being assigned to a variable.
Never mind...I poked around inside of mechsimn.inc and found an example.
Here is and example.....
sphere {
mechsim:mass(39):position,
mechsim:mass(39):radius
pigment{Blue}
}
In this case, 39 is the number of the mass whose position and radius I need.
Tim
Tim McMurdo wrote:
>>My request is for an example code showing the location of a specific mass>>being assigned to a variable.> > > Never mind...I poked around inside of mechsimn.inc and found an example.> > Here is and example.....> > sphere {> mechsim:mass(39):position,> mechsim:mass(39):radius> pigment{Blue}> }> >
Note that you usually don't need to litarally give the 39 but you can
store 'mechsim:mass_count' in a variable in the 'topology' block and use
this index to access the same mass later. The sample scenes coming with
MegaPOV also include examples for this.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______
Christoph Hormann wrote:
>Note that you usually don't need to litarally give the 39 but you can>store 'mechsim:mass_count' in a variable in the 'topology' block and use>this index to access the same mass later. The sample scenes coming with>MegaPOV also include examples for this.
Thanks Christoph. I actually used an array to define the masses and this
allowed me to use the array to address each mass.
Let me take this opportunity to thank you for the massive contribution your
work has made to this community.
Tim