POV-Ray : Newsgroups : povray.unofficial.patches : trace() doesn't work with method 2 isosurfaces? Server Time
2 Sep 2024 02:19:58 EDT (-0400)
  trace() doesn't work with method 2 isosurfaces? (Message 1 to 6 of 6)  
From: Warp
Subject: trace() doesn't work with method 2 isosurfaces?
Date: 25 Jul 2000 11:09:14
Message: <397dad9a@news.povray.org>
I faintly remember that someone had problems with trace() and isosurfaces.
I paid no much attention to that thread, but now I have the same problem.

  I have made the case as simple as possible. It seems that trace() doesn't
work with isosurfaces which use method 2.
  In the following code the trace() with the real torus returns <-2,1,0>
while the trace() with an equivalent isosurface returns <0,0,0>. If you
change the method to 1, it will return (approximately) the same:

#version Unofficial MegaPov 0.5;

$R1=2;
$R2=1;

$Torus1 = torus { R1, R2 }

$Torus2 =
  isosurface
  { function
    { sqrt(sqr(sqrt(sqr(x)+sqr(z))-R1)+sqr(y))-R2
    }
    method 2
    contained_by { sphere { 0,R1+R2 } }
  }

$P1 = trace(Torus1, <-R1,R2*2,0>, -y);
$P2 = trace(Torus2, <-R1,R2*2,0>, -y);

#debug concat("<",str(P1.x,0,-1),",",str(P1.y,0,-1),",",str(P1.z,0,-1),">\n")
#debug concat("<",str(P2.x,0,-1),",",str(P2.y,0,-1),",",str(P2.z,0,-1),">\n")


  In my scene the isosurface is more complex and seems to work well only
with method 2 (method 1 causes holes in the surface).

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


Post a reply to this message

From: Ron Parker
Subject: Re: trace() doesn't work with method 2 isosurfaces?
Date: 25 Jul 2000 13:03:21
Message: <slrn8nrip2.hjs.ron.parker@fwi.com>
On 25 Jul 2000 11:09:14 -0400, Warp wrote:
>  I faintly remember that someone had problems with trace() and isosurfaces.
>I paid no much attention to that thread, but now I have the same problem.

I can duplicate this, but it doesn't make sense yet.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Fabien Mosen
Subject: Re: trace() doesn't work with method 2 isosurfaces?
Date: 25 Jul 2000 15:54:14
Message: <397DEF17.D261CFE1@skynet.be>
Warp wrote:
> 
>   I faintly remember that someone had problems with trace() and isosurfaces.
> I paid no much attention to that thread, but now I have the same problem.

It may not be of much help, but which OS are you using ?  The person
who had the problem was using some Ux flavour.

Using the W95 version, I managed to successfully use trace() on a
ridged multifractal, method 2.  (and I also had success with the
code that person provided).

Might be a version-specific problem...

Fabien.


Post a reply to this message

From: Ron Parker
Subject: Re: trace() doesn't work with method 2 isosurfaces?
Date: 25 Jul 2000 15:55:25
Message: <slrn8nrsrp.hp5.ron.parker@fwi.com>
On Tue, 25 Jul 2000 21:48:39 +0200, Fabien Mosen wrote:
>Warp wrote:
>> 
>>   I faintly remember that someone had problems with trace() and isosurfaces.
>> I paid no much attention to that thread, but now I have the same problem.
>
>It may not be of much help, but which OS are you using ?  The person
>who had the problem was using some Ux flavour.
>
>Using the W95 version, I managed to successfully use trace() on a
>ridged multifractal, method 2.  (and I also had success with the
>code that person provided).
>
>Might be a version-specific problem...

I duplicated it on Win MegaPOV 0.3.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Fabien Mosen
Subject: Re: trace() doesn't work with method 2 isosurfaces?
Date: 25 Jul 2000 21:23:39
Message: <397E3C7E.326EABF7@skynet.be>
Appending the following code to the code you provided, it works
perfectly well in my MegaPOV 0.5A, Win95.  Hope this could help in
debugging purposes.

#include "colors.inc"

camera {location <10,10,10> direction z*1 look_at <0,0,0>}

object {Torus2 pigment {White}}

#declare MinX=-5;
#declare MinZ=-5;
#declare MaxX=5;
#declare MaxZ=5;
#declare ScanStep=.5;
#declare ScanHeight=5;
#declare StockNormal=<0,0,0>;

#declare I=MinX;
#while (I < MaxX)
 #declare J=MinZ;
 #while (J < MaxZ)
   #declare FoundPoint = 
    trace (Torus2,<I,ScanHeight,J>,-y,StockNormal);  
 
    disc {FoundPoint,StockNormal,.15 pigment {Red}}
 
 #declare J=J+ScanStep;
 #end
#declare I=I+ScanStep;
#end

light_source {<400,500,300> White*2}


Post a reply to this message

From: Warp
Subject: Re: trace() doesn't work with method 2 isosurfaces?
Date: 26 Jul 2000 04:48:42
Message: <397ea5e9@news.povray.org>
No, it doesn't seem to work (at least not here). All the discs are put
at <0,0,0>.

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


Post a reply to this message

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