POV-Ray : Newsgroups : povray.general : "Cutting" in isosurfaces Server Time
20 Nov 2024 10:13:58 EST (-0500)
  "Cutting" in isosurfaces (Message 1 to 9 of 9)  
From: Jari Juslin
Subject: "Cutting" in isosurfaces
Date: 3 Oct 2001 21:02:17
Message: <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 :-).

-- 
          /"\                           |    iki.
          \ /     ASCII Ribbon Campaign |    fi/
           X      Against HTML Mail     |    zds
          / \


Post a reply to this message

From: Bob H 
Subject: Re: "Cutting" in isosurfaces
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

From: Jari Juslin
Subject: Re: "Cutting" in isosurfaces
Date: 4 Oct 2001 04:40:40
Message: <3BBC2087.C7239381@iki.fi>
"Bob H." wrote:
> Maybe this is what you're thinking of.

In fact, no :-). The picture I saw had the cut edge also "rounded",
blobby-like way, and that blobby-like cutting object in two was the
effect I am looking for. I didn't see source that time, so it might have
been made of pieces; I think "blobby" intersection of superellipsoidic
cube and planes could reproduce one of those parts, but I was hoping
there would be some way just to split object in two.

-- 
          /"\                           |    iki.
          \ /     ASCII Ribbon Campaign |    fi/
           X      Against HTML Mail     |    zds
          / \


Post a reply to this message

From: Bob H 
Subject: Re: "Cutting" in isosurfaces
Date: 4 Oct 2001 05:05:31
Message: <3bbc265b@news.povray.org>
"Jari Juslin" <zds### [at] ikifi> wrote in message news:3BBC2087.C7239381@iki.fi...
> "Bob H." wrote:
> > Maybe this is what you're thinking of.
>
> In fact, no :-). The picture I saw had the cut edge also "rounded",
> blobby-like way, and that blobby-like cutting object in two was the
> effect I am looking for. I didn't see source that time, so it might have
> been made of pieces; I think "blobby" intersection of superellipsoidic
> cube and planes could reproduce one of those parts, but I was hoping
> there would be some way just to split object in two.

Oh.  I *think* I know what you're saying now.  Inclusion of a deformation
such as what happens when unsliced bread is cut into, pressing the surface
down as the knife goes in.
That requires a inside curve, the kind a cylinder can have if cut open along
its length, which can then be used to CSG difference from something else.

There must be a way to apply a cut into a isosurface like that, I just don't
know how right now.  I'd guess a subtraction of one shape from another could
do it.

Heck, now that I think about it, you partly answered yourself there by
mentioning "blobby".  Using a blob with negative strength and thinly scaled
component you could move it through the positive strength component(s) and
get just such an effect.  That is, if I understood the idea this time.

Bob H.


Post a reply to this message

From: smellenbergh
Subject: Re: "Cutting" in isosurfaces
Date: 4 Oct 2001 16:26:26
Message: <1f0rxzi.88e6cotlyb5gN%smellenbergh@skynet.be>
Jari Juslin <zds### [at] ikifi> wrote:

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

Have a look at the isosurface manual at
http://users.skynet.be/smellenbergh/iso_ind.html
The part on "combining functions" has an example of "Blobbing
difference" which does exactly what you want. If you are using Pov
3.5beta, you should adjust the syntax a little though.



-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

From: Jari Juslin
Subject: Re: "Cutting" in isosurfaces
Date: 4 Oct 2001 20:19:21
Message: <3BBCFC89.A7F58749@iki.fi>
smellenbergh wrote:
> Have a look at the isosurface manual at
> http://users.skynet.be/smellenbergh/iso_ind.html
> The part on "combining functions" has an example of "Blobbing
> difference" which does exactly what you want. If you are using Pov
> 3.5beta, you should adjust the syntax a little though.

Cool, thanks :-). I _knew_ I had seems such things somewhere.

-- 
          /"\                           |    iki.
          \ /     ASCII Ribbon Campaign |    fi/
           X      Against HTML Mail     |    zds
          / \


Post a reply to this message

From: Mike Williams
Subject: Re: "Cutting" in isosurfaces
Date: 5 Oct 2001 01:14:53
Message: <PmAo0BA6DUv7EwPc@econym.demon.co.uk>
Wasn't it Jari Juslin who wrote:
>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 :-).
>

Do you mean something like this?

What I've done is blobbed together a sphere and two double planes
inversed (one flipped y for x, giving a vertical cut). 

The clever bit is that I've multiplied the double plane functions by
some value, "Edge_Sharpness", so that points close to the cut are more
strongly affected by the double plane functions than by the sphere
function. Without this trick, the edges of the cut are very round
indeed.

The inversing of the double planes is done by adding Blobbyness^(Plane(x
,y,z)*Edge_Sharpness) instead of subtracting it as you would normally do
when blobbing isosurfaces together.



#declare Cut_Width = 0.1;
#declare Blobbyness = 0.001;
#declare Edge_Sharpness = 6;

#declare Sphere = function {f_sphere(x,y,z,1)} // Sphere
#declare Plane  = function {(abs(x)-Cut_Width)} // Double plane
                     
isosurface {
  function { (1+Blobbyness) - Blobbyness^Sphere(x,y,z)
              + Blobbyness^(Plane(x,y,z)*Edge_Sharpness)
              + Blobbyness^(Plane(y,x,z)*Edge_Sharpness)
        }      
        max_gradient 3000
        contained_by{sphere{0,1.01}}
        pigment {rgb 1}
}




-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Bill DeWitt
Subject: Re: "Cutting" in isosurfaces
Date: 5 Oct 2001 08:17:21
Message: <3bbda4d1@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote :

>
> Do you mean something like this?

    This seems to stop here for no reason.

#declare Sphere = function {f_sphere(x,y,z,1)} // Sphere

Parse Error:    Expected 'operator', { found instead


Post a reply to this message

From: Tom Melly
Subject: Re: "Cutting" in isosurfaces
Date: 5 Oct 2001 08:31:13
Message: <3bbda811$1@news.povray.org>
"Bill DeWitt" <bde### [at] cflrrcom> wrote in message
news:3bbda4d1@news.povray.org...
>
>     This seems to stop here for no reason.
>
> #declare Sphere = function {f_sphere(x,y,z,1)} // Sphere
>
> Parse Error:    Expected 'operator', { found instead
>

Hey, I own the copywrite on that particular f***-up

#include "functions.inc"

Here's your hat:

cone
{
  1*y,  0.0,
  -1*y, 1.0
  open
  pigment{my_white_with_a_big_fat_D}
}


Post a reply to this message

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