POV-Ray : Newsgroups : povray.binaries.images : isofunction problem (~10kbbu) : isofunction problem (~10kbbu) Server Time
1 Oct 2024 07:19:17 EDT (-0400)
  isofunction problem (~10kbbu)  
From: Richard Dault
Date: 6 Sep 2000 11:21:32
Message: <39b660fc$1@news.povray.org>
Okay, here is the problem I was referring to in my last post.  I have an
iso-sphere which I intersected with an iso-y plane.  So this should give me
a half sphere right?  Well, it does, as long as I keep it at the origin.  As
soon as I translate it away from the origin, I get a strange result.

In the first picture of the three spheres, they should be identical, but
they are not.  Only the green one has the expected result.  Notice something
else that is really strange?  Look at the shadow of the middle sphere.  The
light source is directly above it in the x-direction, but yet the shadow is
of a complete sphere?!?

The second image shows only the middle sphere but moved over by 1 unit.

Anyone know why this is happening?

The code is as follows:

#include "colors.inc"
#version unofficial MegaPov 0.5;

camera { location <0,1,-10> look_at <0,0,0> }
light_source { <0,50,-15> color White }

plane { y 0 pigment { color White } translate y-4 }

#declare ball = function { x*x + y*y + z*z - 2*2 }

#declare broken =
isosurface {
  function {
    ball(x,y,z) & y
  }
  max_trace 5
  method 2
  accuracy 0.001
  threshold 0
  max_gradient 4.5
  contained_by { sphere { 0 2.3 } }
}

#declare half =
difference {
  sphere { 0 1.8 }
  object { broken }
}

object { half rotate z*90 translate x*-4 pigment { color Blue } }
object { half rotate z*90 translate x*0 pigment { color Green } }
object { half rotate z*90 translate x*4 pigment { color Yellow } }


Post a reply to this message


Attachments:
Download 'isobug1.jpg' (7 KB) Download 'isobug2.jpg' (5 KB)

Preview of image 'isobug1.jpg'
isobug1.jpg

Preview of image 'isobug2.jpg'
isobug2.jpg


 

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