POV-Ray : Newsgroups : povray.unofficial.patches : Iso help please Server Time
1 Nov 2024 03:17:51 EDT (-0400)
  Iso help please (Message 1 to 3 of 3)  
From: Tom Melly
Subject: Iso help please
Date: 26 Jul 2001 07:15:20
Message: <3b5ffbc8$1@news.povray.org>
With the following shape, I want to flatten the point on the left side and
sharpen the point on the right side - any suggestions how to do this?

#version unofficial MegaPov 0.7;
#include "colors.inc"
light_source{<0,0,0> color rgb<1,1,1> translate <-300, 0, -300>}
camera{location  <0.0, 0, -15> look_at   <0.0, 0.0,  0.0>}
sky_sphere{pigment{Blue}}

// ----------------------------------------

isosurface{
  function{sqr(x/5+abs(x/20))+sqr(y-abs(y/4))+sqr(z/2)-1}
  method 2
  eval
  max_gradient 20
  contained_by{sphere{0,10}}
  pigment{Green}
  rotate x*-90
}


--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: Christoph Hormann
Subject: Re: Iso help please
Date: 26 Jul 2001 08:52:42
Message: <3B601308.94C7E5C2@gmx.de>
Tom Melly wrote:
> 
> With the following shape, I want to flatten the point on the left side and
> sharpen the point on the right side - any suggestions how to do this?
> 

I must say this function seems rather obscure to me, but how about:

function {
  (-(x+3)/7+abs((x+3)/16))^2  
  + (y-abs(y/4))^2 
  + (z/3)^2
  - 1
}

I personally would use a combination of two ellipsoid functions rather
than this.

something like:

#declare fn_ellipsoid=
function { 
  sqrt(x^2 + y^2 + z^2)-1
}

isosurface{ 
  function {  
    (fn_ellipsoid(x*1.0, y, z)) |
    (fn_ellipsoid(x*0.2, y, z) & (-x))
  }
...
 

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Tom Melly
Subject: Re: Iso help please
Date: 26 Jul 2001 19:09:46
Message: <3b60a33a$1@news.povray.org>
Christoph Hormann wrote in message <3B601308.94C7E5C2@gmx.de>...
>
>I must say this function seems rather obscure to me

You're very polite...

>I personally would use a combination of two ellipsoid functions rather
>than this.

Hmm, not quite what I'm after, but it's given me something to play with...


Post a reply to this message

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