|
|
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'
|
|
|
|
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
|
|
|
|
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
|
|