POV-Ray : Newsgroups : povray.programming : An inside/outside test for triangles mesh : Re: An inside/outside test for triangles mesh Server Time
29 Jul 2024 06:20:42 EDT (-0400)
  Re: An inside/outside test for triangles mesh  
From: Nieminen Mika
Date: 8 Mar 1999 12:22:02
Message: <36e4073a.0@news.povray.org>
Ron Parker <par### [at] my-dejanewscom> wrote:
: It's been done before, in POV 2.2 with heightfields
: which at that time didn't have an inside either.  But I wouldn't 
: count on it working from all angles.

  What do you mean? I just tested this and it seemed to work just fine:
http://www.cs.tut.fi/~warp/hftest.jpg

  The code:

camera { location -z*26 look_at 0 angle 35 }
light_source { <100,200,-200>,1 }
light_source { <-200,-200,-50>,<.2,.4,.6> }

#declare Test=
difference
{ height_field { tga "hf.tga" translate -.5 scale <4,1,4> }
  sphere { 0,1.5 }
  pigment { rgb <1,0,0> }
  finish { specular .5 }
}

object { Test rotate x*-90 translate -x*5+y*2.5 }
object { Test rotate x*-54 translate -x*0+y*2.5 }
object { Test rotate x*-18 translate x*5+y*2.5 }
object { Test rotate x*18 translate -x*5-y*2.5 }
object { Test rotate x*54 translate -x*0-y*2.5 }
object { Test rotate x*90 translate x*5-y*2.5 }


-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/


Post a reply to this message

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