POV-Ray : Newsgroups : povray.general : Object Pattern ISOSurface Server Time
25 Dec 2024 01:48:46 EST (-0500)
  Object Pattern ISOSurface (Message 1 to 9 of 9)  
From: POVMAN
Subject: Object Pattern ISOSurface
Date: 15 Jun 2006 05:55:00
Message: <44912e74$1@news.povray.org>
I havn't tried ...

You can create object pattern media using pigment_map and you can evaluate a 
pigment in a function, can you use object pattern to create an isosurface?

-- 
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/


Post a reply to this message

From: Mike Williams
Subject: Re: Object Pattern ISOSurface
Date: 15 Jun 2006 06:08:10
Message: <F0riiLACGTkEFw49@econym.demon.co.uk>
Wasn't it POVMAN who wrote:
>I havn't tried ...
>
>You can create object pattern media using pigment_map and you can evaluate a 
>pigment in a function, can you use object pattern to create an isosurface?

It would be really neat if it did, because then you could do all sorts
of useful tricks like modifying the shape by adding noise or twisting it
with a coordinate transformation.

Unfortunately, this happens:
http://www.econym.demon.co.uk/isotut/dont.htm

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Chris B
Subject: Re: Object Pattern ISOSurface
Date: 15 Jun 2006 06:10:17
Message: <44913209@news.povray.org>
"POVMAN" <s### [at] acom> wrote in message news:44912e74$1@news.povray.org...
>I havn't tried ...
>
> You can create object pattern media using pigment_map and you can evaluate 
> a pigment in a function, can you use object pattern to create an 
> isosurface?
>
> -- 
> #####-----#####-----#####
> POV Tips and Hints at ...
> http://povman.blogspot.com/
>

Yes,
Gets very slow though.

I was playing around with it a couple of weeks back to try and see if I 
could emulate the sort of caverns that were scanned and animated on the 
animation news group.
I merged four tubes to get some tunnels, then added a bit of turbulence to 
give a rough surface. Lowering the max_gradient setting improves render 
times and results in more holes (similar to the laser scanned animation).

Here's what I came up with:


camera {location <-0.75, 1.7,-2> look_at <0,1.7,0>}
light_source { <-0.2, 1.7, -6 > color 0.4}
light_source { <-0.2, 1.7, -2 > color 0.4}
light_source { <-0.2, 1.7,  2 > color 0.4}
light_source { < 0.2, 1.2,  6 > color 0.4}
light_source { <-0.2, 1.7,  10> color 0.4}
light_source { <-0.2, 1.7,  14> color 0.4}

#declare Simple = 0;

#declare MyTube = intersection {
  box {<-1,0,-100.1>,<1,2.5,100.1>}
  cylinder {<0,1,-100>,<0,1,100>,1.29}
}

#declare MyObject = merge {
  object {MyTube}
  object {MyTube rotate y*90 translate 0.001*y}
  object {MyTube rotate <5,20,0> translate 0.002*y translate 3*z}
  object {MyTube rotate z*10 rotate y*90 translate 0.003*y translate 6*z}
}


#if (Simple) object {MyObject pigment {color rgb <1,1,0>}}
#else
  // Use object as a pigment and define this as a function
  #declare MyFunction = function {
    pigment {
      object {
         MyObject
         color rgb <1,1,1>
         color rgb <0,0,0>
      }
      turbulence 0.1
    }
  }

  // Use Function in Isosurface
  isosurface {
    function { MyFunction (x, y, z).red -0.5}
    contained_by { box { -200, 200} }  // container shape
  //  accuracy 0.001           // accuracy of calculation [0.001]
    max_gradient 2000          // maximum gradient the function can have 
[1.1]
    pigment {color rgb <1,1,1>}
    scale 5
  }
#end

Regards,
Chris B.


Post a reply to this message

From: POVMAN
Subject: Re: Object Pattern ISOSurface
Date: 15 Jun 2006 07:31:26
Message: <4491450e$1@news.povray.org>
Excellent!  And thanks for the code.
-- 
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/


Post a reply to this message

From: Chris B
Subject: Re: Object Pattern ISOSurface
Date: 15 Jun 2006 07:46:37
Message: <4491489d$1@news.povray.org>
"POVMAN" <s### [at] acom> wrote in message news:4491450e$1@news.povray.org...
> Excellent!  And thanks for the code.
> -- 
> #####-----#####-----#####
> POV Tips and Hints at ...
> http://povman.blogspot.com/
>
You're welcome.

I've posted a couple of images on povray.binaries.images.

Regards,
Chris B.


Post a reply to this message

From: ingo
Subject: Re: Object Pattern ISOSurface
Date: 18 Jun 2006 04:37:53
Message: <Xns97E66C26158CCseed7@news.povray.org>
in news:44912e74$1@news.povray.org POVMAN wrote:

> I havn't tried ...
> 
> You can create object pattern media using pigment_map and you can
> evaluate a pigment in a function, can you use object pattern to
> create an isosurface? 

As Mike explained, the direct way is far from optimal.

An alternative method, turn your object into a set of 16 bit gray-scale 
TIFF slices.  Then use a tool like ImageJ http://rsb.info.nih.gov/ij/ to 
blurr the stack. Convert the whole stack into a df3-file and render.

Sadly ImageJ does not read/write df3-files and I don't understand the Java 
to make the right plugin for that ... ImageJ is a vwery usefull tool for 
manipulating 3D-datasets.

Ingo


Post a reply to this message

From: POVMAN
Subject: Re: Object Pattern ISOSurface
Date: 19 Jun 2006 06:01:51
Message: <4496760f@news.povray.org>
I tried using this technique this weekend  but couldn't get a good enough 
result. I'm a sad bunny :-(   .


-- 
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/


Post a reply to this message

From: Chris B
Subject: Re: Object Pattern ISOSurface
Date: 19 Jun 2006 07:13:12
Message: <449686c8$1@news.povray.org>
"POVMAN" <s### [at] acom> wrote in message news:4496760f@news.povray.org...
>I tried using this technique this weekend  but couldn't get a good enough 
>result. I'm a sad bunny :-(   .
>
>
> -- 
> #####-----#####-----#####
> POV Tips and Hints at ...
> http://povman.blogspot.com/
>

I guess it depends exactly what you are you trying to achieve.
If you want a nice complete surface then I expect you'll be running into the 
problems Mike described.

What are you aiming for, maybe someone can suggest an alternative approach?

Regards,
Chris B.


Post a reply to this message

From: POVMAN
Subject: Re: Object Pattern ISOSurface
Date: 19 Jun 2006 07:33:16
Message: <44968b7c$1@news.povray.org>
I wanted to create a weathered statute version of one of my Mech models.

-- 
#####-----#####-----#####
POV Tips and Hints at ...
http://povman.blogspot.com/


Post a reply to this message

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