POV-Ray : Newsgroups : povray.general : "Cutting" in isosurfaces : Re: "Cutting" in isosurfaces Server Time
20 Nov 2024 08:19:32 EST (-0500)
  Re: "Cutting" in isosurfaces  
From: Bob H 
Date: 4 Oct 2001 04:13:53
Message: <3bbc1a41@news.povray.org>
"Jari Juslin" <zds### [at] ikifi> wrote in message news:3BBBB518.63F04E04@iki.fi...
> I am in need of source code or explanation of how to make plane "cut" or
> "split" iso surfaces. I know I have seen a picture of metallic rounded
> box being cut to pieces in a smooth way; like you had cut some irl clay
> object with scissors.
>
> So, if anybody can tell me how to do that, I'd appreciate it :-).

Maybe this is what you're thinking of.

#version 3.5;

light_source {<10,10,-100>,1}

#include "functions.inc"

#declare X=3;
#declare Y=2;
#declare Z=1;

difference {
        isosurface {
                function {f_rounded_box(x,y,z,0.5,X,Y,Z)}
                contained_by {box {-<X,Y,Z>,<X,Y,Z>}}
        }
        plane {+x,1}

        pigment {rgb 1}
        rotate -30 translate 10*z
}

And if you intend to use both halves you'd have to duplicate this with a
plane {-x,1}, which of course means translating the two halves apart or
they'd just be as one piece.

From what I gather about it other isosurfaces might not fair too well, at
least not without first adding max_gradient and/or accuracy settings.  But
this is basically the same as any other CSG is done.  Nothing real special
about it.

Bob H.


Post a reply to this message

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