POV-Ray : Newsgroups : povray.binaries.scene-files : String adjustment scene Server Time
2 Sep 2024 08:13:32 EDT (-0400)
  String adjustment scene (Message 1 to 4 of 4)  
From: Josh English
Subject: String adjustment scene
Date: 6 Dec 2001 17:44:44
Message: <3C0FF4DA.85DB@spiritone.com>
This scene file attempts to recreate the algorithm of Huho Elias work at
http://www.esite-host.com/~rocketmg/models/m_string.htm

The include file has sample code to show how to use it.
Please e-mail me with any questions or comments.

Josh English
eng### [at] spiritonecom


Post a reply to this message


Attachments:
Download 'us-ascii' (5 KB)

From: Mark James Lewin
Subject: Re: String adjustment scene
Date: 6 Dec 2001 22:47:18
Message: <3C103819.8861B21F@yahoo.com.au>
I wrote something similar to this a while ago (based on the same webiste) but never
posted it. My incarnation used one 2D array
to contain pos, vel, and locking points though. This negates the need for checking the
individual arrays comply with one another.
    Anyway you do it, strings are fun.

MJL

--
light_source{12*(y-z)rgb 2fade_distance 9fade_power 2area_light x,z,5,5}#macro A
(H,B,R,T)prism{0,1H+4,0u*9,9v*9,0#local I=1;#while(I<H)#local V=asc(substr(B,I,1
))-33;<div(V,10)mod(V,10)>#local I=I+1;#end pigment{red 1}rotate-<90,R>translate
-T}#end A(16"/.@VZno=<PLA89/"0,5*x)A(14",6;MWmhryXN3,"60<15,0,8>)camera{location
25*(y-z)look_at 0}A(8"6hiAG=6"-60,-10*x)box{-99(x+z)*99 pigment{rgb 1}}   // MJL


Post a reply to this message

From: Josh English
Subject: Re: String adjustment scene
Date: 7 Dec 2001 12:16:37
Message: <3C10F974.2846BB73@spiritone.com>
Mark James Lewin wrote:
> 
>     I wrote something similar to this a while ago (based on the same webiste) but
never posted it. My incarnation used one 2D array
> to contain pos, vel, and locking points though. This negates the need for checking
the individual arrays comply with one another.
>     Anyway you do it, strings are fun.

I thought of playing with a 2d array, but I've got this tied in with my
multispline.inc whenever I use it. How did you lock the points? I can
only see the third array solution.

Josh


Post a reply to this message

From: Mark James Lewin
Subject: Re: String adjustment scene
Date: 10 Dec 2001 22:16:01
Message: <3C1576C8.D3F37E25@yahoo.com.au>
Josh English wrote:

> I thought of playing with a 2d array, but I've got this tied in with my
> multispline.inc whenever I use it. How did you lock the points? I can
> only see the third array solution.
>
> Josh

My array went something like this...

#declare StringArray = array[n][9]

where n was the number of points in the string. Then...

#declare StringArray[i][0] = px;
#declare StringArray[i][1] = py;
#declare StringArray[i][2] = pz;
#declare StringArray[i][3] = vx;
#declare StringArray[i][4] = vy;
#declare StringArray[i][5] = vz;
#declare StringArray[i][6] = cx;
#declare StringArray[i][7] = cy;
#declare StringArray[i][8] = cz;

where px, py and pz is the position of the ith point,
vx, vy and vz is the velocity of the ith point,
and cx, cy and cz is the constraint constant of the ith point (usually only 1 for free
moving points, and 0 for fixed or locked points).

Three arrays in one :-)

MJL

--
light_source{12*(y-z)rgb 2fade_distance 9fade_power 2area_light x,z,5,5}#macro A
(H,B,R,T)prism{0,1H+4,0u*9,9v*9,0#local I=1;#while(I<H)#local V=asc(substr(B,I,1
))-33;<div(V,10)mod(V,10)>#local I=I+1;#end pigment{red 1}rotate-<90,R>translate
-T}#end A(16"/.@VZno=<PLA89/"0,5*x)A(14",6;MWmhryXN3,"60<15,0,8>)camera{location
25*(y-z)look_at 0}A(8"6hiAG=6"-60,-10*x)box{-99(x+z)*99 pigment{rgb 1}}   // MJL


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.