|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've two questions:
I have a cylinder from 0 to x*1, rotate it randomly around the y axis. Can I
find the xyz values of the end point that was x*1?
If so: I make a second cylinder from this point to x*2 and rotate it
randomly - does it rotate around zero or around the end point of cylinder
one? If it rotates around zero how can I make it rotate around the end of
cylinder one? do I have to translate it to zero, then rotate it, then
translate it to the end of cylinder one?
loop back to question one!
Hope that makes sense
Mick
--
*************************************************************
http://www.minda.swinternet.co.uk/index.htm
*************************************************************
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mick Hazelgrove skrev i meddelandet <38c68473@news.povray.org>...
>I have a cylinder from 0 to x*1, rotate it randomly around the y axis. Can
I
>find the xyz values of the end point that was x*1?
I don't think that's possible, if you don't calculate the random value and
save it in a variable before you rotate the cylinder, like this:
#declare R = rand();
rotate <0, R, 0>
Then you can calculate the new endpoint using sin() and cos().
>I make a second cylinder from this point to x*2 and rotate it
>randomly - does it rotate around zero or around the end point of cylinder
>one?
Yes, everything rotates around <0, 0, 0> in POV.
If it rotates around zero how can I make it rotate around the end of
>cylinder one? do I have to translate it to zero, then rotate it, then
>translate it to the end of cylinder one?
Yeah.
--ll
Post a reply to this message
|
|
| |
| |
|
|
From: Nieminen Juha
Subject: Re: difficult questions (for me anyway)
Date: 8 Mar 2000 12:19:55
Message: <38c68bbb@news.povray.org>
|
|
|
| |
| |
|
|
Lars Luthman <no### [at] spamse> wrote:
: #declare R = rand();
: rotate <0, R, 0>
: Then you can calculate the new endpoint using sin() and cos().
Or more easier with vrotate().
--
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
|
|
| |
| |
|
|
From: Mick Hazelgrove
Subject: Re: difficult questions (for me anyway)
Date: 8 Mar 2000 13:13:23
Message: <38c69843@news.povray.org>
|
|
|
| |
| |
|
|
> Or more easier with vrotate().
Please explain, for me and for other maths disadvantaged pov users!
--
*************************************************************
http://www.minda.swinternet.co.uk/index.htm
*************************************************************
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
From the docs:
vrotate(A,B)
Rotate A about origin by B.
Given the x,y,z coordinates of a point in space designated
by the vector A, rotate that point about the origin by an
amount specified by the vector B. Rotate it about the x-axis
by an angle specified in degrees by the float value B.x.
Similarly B.y and B.z specify the amount to rotate in degrees
about the y-axis and z-axis. The result is a vector containing
the new x,y,z coordinates of the point.
A contains a point reference
B contains a rotation reference.
The function vrotate(A,B) returns the new point reference
if you rotate point A by rotation B.
i.e. point{<0,0,0> translate A rotate B}
I know that there is no object called point{ <location>
[OBJECT_MODIFIERS...] }
but it does help to use it in this way with translate and rotate .
Mick Hazelgrove wrote:
>
> > Or more easier with vrotate().
>
> Please explain, for me and for other maths disadvantaged pov users!
>
> --
> *************************************************************
> http://www.minda.swinternet.co.uk/index.htm
>
> *************************************************************
--
Mr. Art
"Often the appearance of reality is more important
than the reality of the appearance."
Bill DeWitt 2000
Post a reply to this message
|
|
| |
| |
|
|
From: Mick Hazelgrove
Subject: Re: difficult questions (for me anyway)
Date: 8 Mar 2000 14:07:53
Message: <38c6a509@news.povray.org>
|
|
|
| |
| |
|
|
Thanks everybody, problem solved.
Mick
--
*************************************************************
http://www.minda.swinternet.co.uk/index.htm
*************************************************************
"mr.art" <mr.### [at] gcinet> wrote in message news:38C69E24.E80E6439@gci.net...
> From the docs:
>
> vrotate(A,B)
> Rotate A about origin by B.
> Given the x,y,z coordinates of a point in space designated
> by the vector A, rotate that point about the origin by an
> amount specified by the vector B. Rotate it about the x-axis
> by an angle specified in degrees by the float value B.x.
> Similarly B.y and B.z specify the amount to rotate in degrees
> about the y-axis and z-axis. The result is a vector containing
> the new x,y,z coordinates of the point.
>
>
> A contains a point reference
> B contains a rotation reference.
> The function vrotate(A,B) returns the new point reference
> if you rotate point A by rotation B.
>
> i.e. point{<0,0,0> translate A rotate B}
>
> I know that there is no object called point{ <location>
> [OBJECT_MODIFIERS...] }
> but it does help to use it in this way with translate and rotate .
>
> Mick Hazelgrove wrote:
> >
> > > Or more easier with vrotate().
> >
> > Please explain, for me and for other maths disadvantaged pov users!
> >
> > --
> > *************************************************************
> > http://www.minda.swinternet.co.uk/index.htm
> >
> > *************************************************************
>
> --
> Mr. Art
>
> "Often the appearance of reality is more important
> than the reality of the appearance."
> Bill DeWitt 2000
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Mick Hazelgrove who wrote:
>I make a second cylinder from this point to x*2 and rotate it
>randomly - does it rotate around zero or around the end point of cylinder
>one? If it rotates around zero how can I make it rotate around the end of
>cylinder one? do I have to translate it to zero, then rotate it, then
>translate it to the end of cylinder one?
You can get it to behave either way. You just have to configure things
right. If you want cylinder 2 to rotate about the end of cylinder 1,
then define them something like this:-
#declare Forearm = cylinder {0,x,...
rotate <...> // elbow
}
#declare WholeArm = union {
cylinder {0,x,...}
object {Forearm translate x}
rotate <...> // shoulder
}
The rotate instruction attached to Forearm rotates it about the elbow,
and the rotate instruction attached to WholeArm rotates the whole arm
about the shoulder keeping the elbow joint connected.
In general, the trick is to create the objects with the rotation point
at zero, apply the rotation, then perform the translation to where you
really want them later. In this way you can keep adding more sections to
the hierarchy and they'll all hang together and rotate correctly about
the joints you create.
--
Mike Williams * ##
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mick Hazelgrove wrote:
> I've two questions:
>
> I have a cylinder from 0 to x*1, rotate it randomly around the y axis. Can I
> find the xyz values of the end point that was x*1?
cylinder { <0,0,0>,<1,0,0>,n rotate bla*y } //correct?
then the end point will be <sin(bla),0,cos(bla)>
> If so: I make a second cylinder from this point to x*2 and rotate it
> randomly - does it rotate around zero or around the end point of cylinder
> one? If it rotates around zero how can I make it rotate around the end of
> cylinder one? do I have to translate it to zero, then rotate it, then
> translate it to the end of cylinder one?
Unfortunately, yes. Maybe I should add arbitrary origin to those macros... :-)
--
___ _______________________________________________
| \ |_ <dav### [at] faricynet> <ICQ 55354965>
|_/avid |ontaine http://www.faricy.net/~davidf/
"The only difference between me and a madman is that I'm not mad." -Dali
Post a reply to this message
|
|
| |
| |
|
|
From: Nieminen Juha
Subject: Re: difficult questions (for me anyway)
Date: 9 Mar 2000 03:17:10
Message: <38c75e06@news.povray.org>
|
|
|
| |
| |
|
|
Mick Hazelgrove <mha### [at] mindaswinternetcouk> wrote:
: Please explain, for me and for other maths disadvantaged pov users!
As mr. art said, there's this thing called "documentation". Ever heard
about it?
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Juha wrote:
>
> Mick Hazelgrove <mha### [at] mindaswinternetcouk> wrote:
> : Please explain, for me and for other maths disadvantaged pov users!
>
> As mr. art said, there's this thing called "documentation". Ever heard
> about it?
I have but without the proper educational background there are times it
makes absolutely no sense what so ever. An example is sometimes worth
1000 documented words. If a person had understood the original explaination
they would not have asked for clarification. What is easy for you may be
difficult for others. Not every thing in POV-Ray is inherently obvious
or intuitive. We are here to help not criticize. Dare to teach so that
others may learn. Patients is a virtue. Lead by example. Give till it
hurts.
--
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
|
|
| |
| |
|
|
|
|
| |
|
|