POV-Ray : Newsgroups : povray.binaries.images : Isosurface help? Server Time
14 Nov 2024 06:12:54 EST (-0500)
  Isosurface help? (Message 1 to 3 of 3)  
From: Rob Richens
Subject: Isosurface help?
Date: 1 Aug 2004 02:26:11
Message: <410c8d03$1@news.povray.org>
I'm trying to make an arch using isosurface blocks and need a parallelogram
block.  Attached is the closest I've gotten, and here's the code to get
that:

#declare F2=function{pigment{
  agate
  turbulence 0.5
  color_map { [0 rgb 1] [.01 rgb 0][1 rgb 1] }
  scale 1
  translate x*3
  }
}

#declare my_brick=isosurface {
  function { f_rounded_box(x*(.5-y/6),y,z,0.03,0.7,0.7,0.7) +
F2(x,y,z).grey*0.01 }


        max_gradient 2
        contained_by{sphere {0,R*2.7}}
        pigment {rgb .9}
        scale .5
        //finish {phong 0.5 phong_size 10}
};


There's a slight curve to the sides, how can I get them straight?

Thanks!

Rob


Post a reply to this message


Attachments:
Download 'std009.jpg' (7 KB)

Preview of image 'std009.jpg'
std009.jpg


 

From: Slime
Subject: Re: Isosurface help?
Date: 1 Aug 2004 03:23:10
Message: <410c9a5e@news.povray.org>
x*(.5-y/6)

You're on the right track with that. Try this:

x-y/6

and you'll find that you have a quadrilateral block. Now you just need to
mirror that across the center. One way to do this is:

abs(x)-y/6

which only works because the block starts off symmetrical. An alternative
option is:

x - sign(x)*y/6

where sign(x) is defined as (untested code):

#declare sign = function(x) {select(x,-1,1)}

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Rob Richens
Subject: Re: Isosurface help?
Date: 4 Aug 2004 00:34:12
Message: <41106744$1@news.povray.org>
That was exactly what I was looking for!  Thanks!

Rob
"Slime" <fak### [at] emailaddress> wrote in message
news:410c9a5e@news.povray.org...
> x*(.5-y/6)
>
> You're on the right track with that. Try this:
>
> x-y/6
>
> and you'll find that you have a quadrilateral block. Now you just need to
> mirror that across the center. One way to do this is:
>
> abs(x)-y/6
>
> which only works because the block starts off symmetrical. An alternative
> option is:
>
> x - sign(x)*y/6
>
> where sign(x) is defined as (untested code):
>
> #declare sign = function(x) {select(x,-1,1)}
>
>  - Slime
>  [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

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