POV-Ray : Newsgroups : povray.animations : CSG tree of Unions Server Time
23 Nov 2024 12:29:19 EST (-0500)
  CSG tree of Unions (Message 1 to 8 of 8)  
From: melo
Subject: CSG tree of Unions
Date: 4 Feb 2008 03:45:01
Message: <web.47a6d01895eefef63c0d56f20@news.povray.org>
Well I have a hierarchically structured CSG tree. Different parts of the tree at
different levels represent different body parts.

#declare Humanoid =
  union { // trunk
    cone{ ..}
    sphere{ ...}
    union{  // right arm
      sphere{..} // shoulder
      cone{..}   // upperarm
      union{ // lower right arm
        sphere{..} // elbow
        cone{..} // lowerarm
        union{
           sphere{..} wrist
           object{ right_hand }
           }
        }
    }

This structuring allows me to animate by rotating about joints/spheres.  After
rotating a number of body parts, the coordinates of the sphere, cone objects
that make up Humanoid object change.

Now questions:
1. Do those changes get reflected back in the POV-RAY SDL variable Humanoid?
2. Is it possible to traverse my CSG Unioned tree object and figure out where
the limbs of my virtual guy have ended up at? [I need to be able to do this so
I can put my Humanoid into the pose he was at the end of the prev stage, at the
beginning of the new stage.)


Post a reply to this message

From: Chris B
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 05:21:31
Message: <47a6e72b$1@news.povray.org>
"melo" <mel### [at] coxnet> wrote in message 
news:web.47a6d01895eefef63c0d56f20@news.povray.org...
> Well I have a hierarchically structured CSG tree. Different parts of the 
> tree at
> different levels represent different body parts.
>
> #declare Humanoid =
>  union { // trunk
>    cone{ ..}
>    sphere{ ...}
>    union{  // right arm
>      sphere{..} // shoulder
>      cone{..}   // upperarm
>      union{ // lower right arm
>        sphere{..} // elbow
>        cone{..} // lowerarm
>        union{
>           sphere{..} wrist
>           object{ right_hand }
>           }
>        }
>    }
>
> This structuring allows me to animate by rotating about joints/spheres. 
> After
> rotating a number of body parts, the coordinates of the sphere, cone 
> objects
> that make up Humanoid object change.
>
> Now questions:
> 1. Do those changes get reflected back in the POV-RAY SDL variable 
> Humanoid?

Once the parser has read the definition in your SDL the internal 
representation of the variable Humanoid will end up holding an internal 
representation of the shapes resulting from the application of the 
transformations to the objects. You won't be able to access that internal 
representation from further down in your SDL other than by referencing the 
variable 'Humanoid'. That is to say that POV-Ray doesn't expose the internal 
representation.

It's different from the way things like HTML and VRML have evolved with 
their separation between the DOM and scripting to support interrogation of 
the current DOM hierarchy from the scripting language.

> 2. Is it possible to traverse my CSG Unioned tree object and figure out 
> where
> the limbs of my virtual guy have ended up at? [I need to be able to do 
> this so
> I can put my Humanoid into the pose he was at the end of the prev stage, 
> at the
> beginning of the new stage.)

No. You won't be able to traverse the elements of the composite CSG object 
as you've currently got it defined. The only access you subsequently have to 
it is through the variable 'Humanoid'. There are some functions that give 
you specific pieces of information about it, such as the min_extents() and 
max_extents() vector functions, but the information returned is for the 
whole object, not for individual components.

The simplest solution is likely to be to store away the information you will 
need later as you go through building up your object definition. You will 
find arrays handy for this as they can store all sorts of things, including 
vectors for positions and rotations, but also entire transformations. 
Transformations assigned to an identifier can subsequently be applied to 
position vectors using the 'vtransform' macro.

Regards,
Chris B.


Post a reply to this message

From: melo
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 06:35:01
Message: <web.47a6f8447294e2553c0d56f20@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:

Thank you very much for responding so promptly.

I have a better idea of POV_RAY SDL environment .

I hope you will have time to respond to my other post.

Thanks again,
Meltem

> "melo" <mel### [at] coxnet> wrote in message
> news:web.47a6d01895eefef63c0d56f20@news.povray.org...
> > Well I have a hierarchically structured CSG tree. Different parts of the
> > tree at
> > different levels represent different body parts.
> >
> > #declare Humanoid =
> >  union { // trunk
> >    cone{ ..}
> >    sphere{ ...}
> >    union{  // right arm
> >      sphere{..} // shoulder
> >      cone{..}   // upperarm
> >      union{ // lower right arm
> >        sphere{..} // elbow
> >        cone{..} // lowerarm
> >        union{
> >           sphere{..} wrist
> >           object{ right_hand }
> >           }
> >        }
> >    }
> >
> > This structuring allows me to animate by rotating about joints/spheres.
> > After
> > rotating a number of body parts, the coordinates of the sphere, cone
> > objects
> > that make up Humanoid object change.
> >
> > Now questions:
> > 1. Do those changes get reflected back in the POV-RAY SDL variable
> > Humanoid?
>
> Once the parser has read the definition in your SDL the internal
> representation of the variable Humanoid will end up holding an internal
> representation of the shapes resulting from the application of the
> transformations to the objects. You won't be able to access that internal
> representation from further down in your SDL other than by referencing the
> variable 'Humanoid'. That is to say that POV-Ray doesn't expose the internal
> representation.
>
> It's different from the way things like HTML and VRML have evolved with
> their separation between the DOM and scripting to support interrogation of
> the current DOM hierarchy from the scripting language.
>
> > 2. Is it possible to traverse my CSG Unioned tree object and figure out
> > where
> > the limbs of my virtual guy have ended up at? [I need to be able to do
> > this so
> > I can put my Humanoid into the pose he was at the end of the prev stage,
> > at the
> > beginning of the new stage.)
>
> No. You won't be able to traverse the elements of the composite CSG object
> as you've currently got it defined. The only access you subsequently have to
> it is through the variable 'Humanoid'. There are some functions that give
> you specific pieces of information about it, such as the min_extents() and
> max_extents() vector functions, but the information returned is for the
> whole object, not for individual components.
>
> The simplest solution is likely to be to store away the information you will
> need later as you go through building up your object definition. You will
> find arrays handy for this as they can store all sorts of things, including
> vectors for positions and rotations, but also entire transformations.
> Transformations assigned to an identifier can subsequently be applied to
> position vectors using the 'vtransform' macro.
>
> Regards,
> Chris B.


Post a reply to this message

From: Chris B
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 07:53:31
Message: <47a70acb@news.povray.org>
"melo" <mel### [at] coxnet> wrote in message
> I hope you will have time to respond to my other post.
>
> Thanks again,
> Meltem

Hi again Meltem,
Do you mean your "skeletal animation using POV-RAY" post?

On that thread I posted a lengthy response which is followed by a follow-up 
response from you, but in your response I only see a copy of my response (I 
see no additional text).
I've checked on the  http://news.povray.org web site because my Outlook 
Express newsgroup reader quite often misses postings or responses, but the 
thread looks the same there.

Did you post follow-up questions on that thread that I'm not seeing?

Regards,
Chris B.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 09:17:51
Message: <47a71e8f$1@news.povray.org>
Chris B escribió:
> Do you mean your "skeletal animation using POV-RAY" post?
> 
> On that thread I posted a lengthy response which is followed by a follow-up 
> response from you, but in your response I only see a copy of my response (I 
> see no additional text).

I see the same.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 10:10:01
Message: <web.47a72a9e7294e255c150d4c10@news.povray.org>
"melo" <mel### [at] coxnet> wrote:
> Well I have a hierarchically structured CSG tree. Different parts of the tree at
> different levels represent different body parts.
>
> #declare Humanoid =
>   union { // trunk
>     cone{ ..}
>     sphere{ ...}
>     union{  // right arm
>       sphere{..} // shoulder
>       cone{..}   // upperarm
>       union{ // lower right arm
>         sphere{..} // elbow
>         cone{..} // lowerarm
>         union{
>            sphere{..} wrist
>            object{ right_hand }
>            }
>         }
>     }
>
> Now questions:
> 1. Do those changes get reflected back in the POV-RAY SDL variable Humanoid?
> 2. Is it possible to traverse my CSG Unioned tree object and figure out where
> the limbs of my virtual guy have ended up at? [I need to be able to do this so
> I can put my Humanoid into the pose he was at the end of the prev stage, at the
> beginning of the new stage.)

Appropriately structured and nested use of vaxis_rotate and/or vrotate could be
of use.

-tgq


Post a reply to this message

From: melo
Subject: Re: CSG tree of Unions
Date: 4 Feb 2008 21:10:01
Message: <web.47a7c4c77294e2553c0d56f20@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
Sorry Chris,

I composed a length response to your response, with lots of burried in thanks,
comments, and some additional questions.  I am stresses to see it go.  However,
I will respond to it again.

Getting my Humanoid moving smoothly is of utmost importance to me.  I realize
for a brand new beginner to animation, and to POV-RAY, I might have bitten of
more than I could chew.

Well, I am driven I see skeletal animation as a good visual way for me to learn
about the physiology of movement.  As this deepened understanding could help me
conduct research toward building motion enabler devices.  3.5 years ago I got
hit by a car going 35-45mph as a pedestian, head on.  Well after the impact the
car continued to move, I did not.  I was in the hospital for 6 months, and then
wellchair bond for another year.  Now, most of my movement and cognition is
back.  My rehabilitation period had put me in touch with other people with TBI.
Not all of them were as lucky as me.

I have no idea if my dreams of using computer technology towards helping people
will come to fruitation.  That dream keeps me going, and it brings me joy.

Sorry, I am being too chitty, chatty.   Now I need to go and repost to skeletal
animation comments/questions.

Cheers,
Meltem

> "melo" <mel### [at] coxnet> wrote in message
> > I hope you will have time to respond to my other post.
> >
> > Thanks again,
> > Meltem
>
> Hi again Meltem,
> Do you mean your "skeletal animation using POV-RAY" post?
>
> On that thread I posted a lengthy response which is followed by a follow-up
> response from you, but in your response I only see a copy of my response (I
> see no additional text).
> I've checked on the  http://news.povray.org web site because my Outlook
> Express newsgroup reader quite often misses postings or responses, but the
> thread looks the same there.
>
> Did you post follow-up questions on that thread that I'm not seeing?
>
> Regards,
> Chris B.


Post a reply to this message

From: Leroy
Subject: Re: CSG tree of Unions
Date: 5 Feb 2008 23:44:44
Message: <47A93A7C.5030209@joplin.com>
I've been following your adventures in animation with some interest as I 
have travel down that road also.
  I started with still poses of robots made from scratch for each pose. 
Then I put all the angles to position body parts in separate file. As I 
used the Robots for still pictures I had a robot POV that made the robot 
that could be call from a scene file. The scene file would have the pose 
file name and pass it to the robot, the robot would read it, make a 
robot, then pass back an object call 'Robot'. The Scene file could place 
that 'Robot' anywhere ya wanted. I could have several robots in various 
positions and poses in a scene. Once I had a few poses I made a few 
different robot POVs that could use those pose files.
  Now on to animation. I decided I had all those poses it would be nice 
if I could have a robot move. I've seen that you've been asking about
the same stuff I found out through trial and error. I have an web page

http://leroywhetstone.s5.com/

It has the result of my animting robots. I went with ....
I'll let you check out that web page before I turn this post into a 
novel. It should be helpful.

Have Fun!


Post a reply to this message

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