POV-Ray : Newsgroups : povray.general : sphere and torus syntax : Re: sphere and torus syntax Server Time
2 Nov 2024 07:23:40 EDT (-0400)
  Re: sphere and torus syntax  
From: Warp
Date: 18 Apr 2004 10:20:36
Message: <40828eb4@news.povray.org>
Severi Salminen <sev### [at] not_thissibafi> wrote:
> I see no clever reason why there is not/should be the center parameter.

  I do.

  AFAIK all primitives are created with no transformation matrix by
default. The transformation matrix only slows down the raytracing if
it's unneeded and thus it's not created by default to any primitive.
For instance, a sphere with a center (located anywhere) and a radius
can be raytraced without a transformation matrix.
  Even when you transform a primitive POV-Ray will try to avoid
creating a transformation matrix if it can. For example, if you
translate or scale uniformly a sphere (and probably even when
you rotate it) it will not create a transformation matrix for it
but only modify its center and radius.

  A torus is a quartic. I don't remember if you can specify a location
offset for the torus quartic, but whether or not you can, the torus
implementation was probably designed to be as fast as possible by
not introducing more complexity to the quartic. Thus any transformation
you apply to the torus (even a translate) will generate a transformation
matrix for it. This means that if the torus syntax would have a center
parameter, a transformation matrix would always be created for it.
  Granted, this would probably not matter anything, but the torus
probably just follows the same principle as all the other primitives:
No transformation matrix by default.

  (And no, I haven't checked if it's true that no primitives get a
transformation matrix by default, so I may be wrong here. :) )

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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