POV-Ray : Newsgroups : povray.newusers : Isosurface and f_spiral - bug or feature? : Re: Isosurface and f_spiral - bug or feature? Server Time
16 Apr 2024 06:03:48 EDT (-0400)
  Re: Isosurface and f_spiral - bug or feature?  
From: Kenneth
Date: 25 Sep 2017 03:10:01
Message: <web.59c8aa9f808cf402883fb31c0@news.povray.org>
"omniverse" <omn### [at] charternet> wrote:

>
> I looked at the f_spiral in source code but couldn't be sure where it creates
> the initial sphere, which apparently is merely the result of the diameter used
> for spiral arm.

That seems to be the case, just from experimenting with the OP's test code. The
sphere diameter is some percentage of the 'thickness' parameter (maybe 100%,
although it's hard to tell.) That sphere makes me wonder what it's purpose is--
maybe it hides some other kind of anomoly at the beginning of the spiral ;-)
Otherwise, it would seem natural for the spiral shape to both begin and end at a
nice sharp point.
>
> The outer straight edge might be a result of couple things. One is that as it
> tapers off due to overall size given to it there's a clipping (or rather
> differencing) effect because of the "outer size" parameter.

Agreed (and which is different from the isosurface's own contained_by sphere.)

> And the other might simply be related to max_gradient.

Nope, that doesn't affect the 'inner' straight-line anomoly. It's actually just
an optical illusion (which took me awhile to figure out-- I had to rotate the
spiral around in an animation, to see the true cause.) The 'straight line' is
just the join-line between the OP's 'square' spiral shape and the center sphere,
where they blend together ('blend' is probably the wrong word.) In other words,
it just a result of the different geometries. It is naturally more pronounded as
the 'thickness' value increases...and actually appears worse when using a
'round' shape for the spiral. The OP's original image of multiple stacked
spirals (with transmit 1 in the colors, as well as the camera position) was
making the problem hard to see.

Here's my re-worked test code, with only a few minor changes. It's a close-up of
the center sphere. Comment-out both of the rotations at the end, to see the
'straight-line' effect.

#version 3.7;
global_settings { assumed_gamma 1 }
#include "colors.inc"
#include "transforms.inc"

light_source { <-1,8,3> color White}

camera {
  perspective
  location  <0, 12, 0>
  look_at   <0, 0, .1>
  right     x*image_width/image_height
  angle 4 // 15 or 4
}

plane {y, -20 pigment { checker Grey, White}}

isosurface{ function{f_spiral(x,y,z,
   6,   // distance between windings-- 6
   .2, // thickness-- .2
   2.0,    // outer radius of the spiral-- 2
   0,  // not used
   0,  // not used
   0   // cross-section type-- 0 for square. Or 1.0 for round.
   )}
   accuracy 0.001
   threshold 0
   max_gradient 40
   contained_by{sphere{<0,0,0>,3}} // [originally <0,0,0>,15 -- too big]
   texture{pigment{ color Red}}
   no_shadow
   rotate 30*x
   rotate 30*z
   }


Post a reply to this message

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