POV-Ray : Newsgroups : povray.newusers : Why didn't this work? Server Time
28 Nov 2024 21:56:54 EST (-0500)
  Why didn't this work? (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Ron Parker
Subject: Re: Why didn't this work?
Date: 6 Jul 2000 16:46:51
Message: <slrn8m9sq1.o08.ron.parker@linux.parkerr.fwi.com>
On Thu, 6 Jul 2000 22:24:08 +0200, Marc-Hendrik Bremer wrote:
>You could achieve this with the megapov-keywords min_extend and max_extend,
>if I get this right. How accurate are the bounding boxes of the 'primitive'
>pov-primitives like spheres, boxes, cones, cylinders? Is the object
>'centered' in there. I know this is not a accurate term, 'course where is
>the center? What I mean is: would min_extend.x and max_extend.x return -1
>and 1 for a sphere{0,1}, a box{-1,1}, a cone {<-1,0,0>,1,<1,0,0>,2}?

The keywords are min_extent and max_extent (t, not d.)  I wrote the
implementation, so I should know. 

They're generally pretty accurate for simple primitives, and in the four
cases you mentioned the object is centered in there.  If you have rotated
the objects, the bounding box gets larger rather than rotating, so there's
likely to be some space for them to rattle around in the box. 

CSG objects are likely to overbound, and some objects are just plain 
unbounded (poly springs to mind.)  I think it's probably better to just 
know what you want the center of the object to be and keep it in mind while 
you're designing it, then do any scales or rotations before translating 
it to the final location.  If you find it easier to work in terms of 
local or global transforms, (e.g. you want to rotate the table after you
translate it where you need it) then use the macros I posted in that other 
thread. (Remember to read the followup; it fixes an error.)
  
-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Why didn't this work?
Date: 6 Jul 2000 17:56:40
Message: <39650098@news.povray.org>
Thanks, I think I will just use the 'normal' way.

Marc-Hendrik


Post a reply to this message

From: Markus Becker
Subject: Re: Why didn't this work?
Date: 7 Jul 2000 05:42:24
Message: <3965A734.DFAE3B7@student.uni-siegen.de>
Chris Huff wrote:
> "by a number smaller or greater than zero"
> "smaller" == "less than" == "below"
> :-)

:-(

markus


Post a reply to this message

From: Warp
Subject: Re: Why didn't this work?
Date: 7 Jul 2000 18:59:32
Message: <396660d4@news.povray.org>
Marc-Hendrik Bremer <Mar### [at] t-onlinede> wrote:
: But I wonder if it would be possible to write a macro which does the
: following:
: 1. Translate the Object which is specified by a parameter to the Origin
: (with whatever point one chooses for the non-existing origin of the object)
: 2. Rotate or scale or whatever the Object by a specified (through a
: parameter) amount
: 3. Translate the Object back to its place

  Quite trivial, I think:

#macro LocalTransform(LocalOrigin, Transformation)
  translate -LocalOrigin
  transform { Transformation }
  translate LocalOrigin
#end

  The same for individual transformations (rotate, scale) if wished

: out where a Object is, say you have a sphere at <10,0,10>. Is it possible to
: get this vector from the "sphere-statement" (without declaring it
: previously)? Did not here about something like this yet.

  As I said, objects do not have local origins.

-- 
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: Warp
Subject: Re: Why didn't this work?
Date: 7 Jul 2000 19:01:15
Message: <3966613b@news.povray.org>
Yes, reading more carefully I realize that I misunderstood a bit what
you were saying. I apologize if I offended you in any way.

-- 
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: Outback
Subject: Re: Why didn't this work?
Date: 8 Jul 2000 23:36:55
Message: <3967f357$1@news.povray.org>
just testing a reply ... new account ... will delete asap


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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