POV-Ray : Newsgroups : povray.general : SDL Access to Already Declared Objects? : Re: SDL Access to Already Declared Objects? Server Time
2 Nov 2024 11:26:16 EDT (-0400)
  Re: SDL Access to Already Declared Objects?  
From: Christopher James Huff
Date: 25 Mar 2004 08:41:26
Message: <cjameshuff-66A24A.08414525032004@news.povray.org>
In article <40620208$1@news.povray.org>,
 "Chambers" <bdc### [at] yahoocom> wrote:

> > sphere { y*10,1 } is located at the origin? Well Real Life (tm) is not
> > logical, either, so why not :)
> 
> Well, OK, that would start located at <0,10,0> - but that's because you
> define the center of it there!

What about cone {y*2, 0, y*5, 2}? Where's its center? y*3.5? y*4? It 
certainly isn't < 0, 0, 0>.

Or for a more extreme example:

union {
    sphere {-x*5, 5}
    cylinder {-x*1, x*10, 0.05}
}

There's obviously far more of the object on the -x side than on the +x 
side, but it extends an equal distance in both directions. Center of 
mass/volume? Center of extents?


> OK, so even if we don't do the whole POV syntax, would it be possible just
> to get object positions like this?

No, because there is no single vector that can represent the position of 
an arbitrary object. You couldn't even get the transformations without 
some additional work, because some objects apply the transformations at 
parse time. For example, translating a sphere will move the center point 
instead of adding a transformation matrix which would have to be 
evaluated during tracing.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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