|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
i was wondering if these two lines are feasible to move an object along
the x-axis, i can't seem to find an example of how to translate an
object along a linear path
#declare XPos = clock*10;
sphere { <XPos,0,0>, .5 }
also, those lines should be the same as this one right?
sphere { <clock*10,0,0>, .5 }
thanks for any help!
CMcCabe
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 02 Mar 2000 18:55:58 -0500, CMcCabe wrote:
>i was wondering if these two lines are feasible to move an object along
>the x-axis, i can't seem to find an example of how to translate an
>object along a linear path
>#declare XPos = clock*10;
>sphere { <XPos,0,0>, .5 }
>
>also, those lines should be the same as this one right?
>sphere { <clock*10,0,0>, .5 }
>
Yes this should work fine, but personally I'd prefer
sphere { <0,0,0>, .5
translate <clock*10,0,0>
}
This will move the sphere from <0,0,0> to <10,0,0>.
--
Cheers
Steve email mailto:sjl### [at] ndirectcouk
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.ndirect.co.uk/~sjlen/
or http://start.at/zero-pps
12:54am up 1:07, 5 users, load average: 1.18, 1.12, 1.03
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Good point Steve, if you were to scale or rotate that sphere you would be doing
so with it already moved and can't go back without some extra transformations
done to reverse it.
Changes in a primitives location vector are fine if the primitives are never to
be changed thereafter, just not a good common practice I would think.
Bob
"Steve" <sjl### [at] ndirectcouk> wrote in message
news:slr### [at] zero-ppslocaldomain...
| On Thu, 02 Mar 2000 18:55:58 -0500, CMcCabe wrote:
| >i was wondering if these two lines are feasible to move an object along
| >the x-axis, i can't seem to find an example of how to translate an
| >object along a linear path
| >#declare XPos = clock*10;
| >sphere { <XPos,0,0>, .5 }
| >
| >also, those lines should be the same as this one right?
| >sphere { <clock*10,0,0>, .5 }
| >
|
| Yes this should work fine, but personally I'd prefer
|
| sphere { <0,0,0>, .5
| translate <clock*10,0,0>
| }
|
| This will move the sphere from <0,0,0> to <10,0,0>.
|
|
|
| --
| Cheers
| Steve email mailto:sjl### [at] ndirectcouk
|
| %HAV-A-NICEDAY Error not enough coffee 0 pps.
|
| web http://www.ndirect.co.uk/~sjlen/
|
| or http://start.at/zero-pps
|
| 12:54am up 1:07, 5 users, load average: 1.18, 1.12, 1.03
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bob Hughes wrote:
> Changes in a primitives location vector are fine if the primitives are never to
> be changed thereafter, just not a good common practice I would think.
I am a lazy scene coder and will always avoid declaring a variable when
I don't have to. In my opinion declaring a bunch of variables for single
objects not only clutters the scene file but it also creates more work.
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
More generally:
If you want to move an object linearly from point A to point B, you can do
it this way:
#declare PointA = <1,2,3>;
#declare PointB = <-1,-2,-3>;
object
{ MyObject
translate PointA*(1-clock)+PointB*clock
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|