POV-Ray : Newsgroups : povray.binaries.images : MegaPov magic trick: watch as I saw an iso in half! Server Time
19 Aug 2024 04:22:44 EDT (-0400)
  MegaPov magic trick: watch as I saw an iso in half! (Message 1 to 2 of 2)  
From: Greg M  Johnson
Subject: MegaPov magic trick: watch as I saw an iso in half!
Date: 2 Jan 2001 15:25:38
Message: <3A5237E4.F6F237A5@my-dejanews.com>
Using Megapov, I present a collection of three images:
1) the first is a union of five spheres at +/- xyz  unioned with a
parametric surface (the superellipsoid equation for a sphere of radius
1).
2) I then union this union with a small brown box.
3) I then difference union #1 minus the small brown box.

Voila!  I have cut through the parametric surface without cutting
through the spheres! At no time does the brown box cut through spheres
at <0,0,0> nor <0,0,1>!  (It does cut through the back half of sphere at
<0,0,-1>, if you observe closely).

(If this is a known phenomenon, sorry for the bother.)


----------------------------------------------------
#version unofficial MegaPov 0.5;
#include "colors.inc"
camera  {
        location <0,1.8,-8>
        look_at <0,0,0>
        angle 26
        }

light_source{<-70,1500,-1200>rgb 1.55}

#declare rx=1;
#declare ry=1;
#declare rz=1;

#declare n1=1;
#declare n2=1;


  //union{                        //UNCOMMENT OUT THIS LINE!, then
  //difference{                     //UNCOMMENT OUT THIS LINE!

union{
        sphere {<0,0,0>,0.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {<-1,0,0>,.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {< 1,0,0>,.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {<0,-1,0>,.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {<0, 1,0>,.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {<0,0,-1>,.1 pigment {Yellow} finish{ambient 0.3}}
        sphere {<0,0, 1>,.1 pigment {Yellow} finish{ambient 0.3}}

        parametric {
                function
                rx*(cos(u)^n1)*(cos(v)^n2),
                ry*(cos(u)^n1)*(sin(v)^n2),
                rz*(sin(u)^n1)
                <-pi,-pi>, <pi,pi>
                <-2,-2,-2>, <2,2,2>
                accuracy 0.001
                ////////precompute 15, [x, z]
                pigment{SeaGreen*0.8}
                finish{ambient 0.3}
                rotate <90,0,0>
        }
}

//UNCOMMENT OUT THE NEXT TWO LINES!
    //    box{<-0.5,-0.5,-0.5>,<0.5,0.5,-1.0>        pigment
{Brown}        }
     // }

light_source{<-70,1200,-120>rgb 1.}
light_source{<88,-200,-50>rgb .3}

background{White/2.7+Blue/2}


Post a reply to this message


Attachments:
Download 'csgparametric.jpg' (12 KB)

Preview of image 'csgparametric.jpg'
csgparametric.jpg


 

From: Chris Huff
Subject: Re: MegaPov magic trick: watch as I saw an iso in half!
Date: 2 Jan 2001 16:12:39
Message: <chrishuff-133B67.16140702012001@news.povray.org>
In article <3A5237E4.F6F237A5@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> Voila!  I have cut through the parametric surface without cutting
> through the spheres! At no time does the brown box cut through spheres
> at <0,0,0> nor <0,0,1>!  (It does cut through the back half of sphere at
> <0,0,-1>, if you observe closely).

Just a wild guess...increase the max_trace for the parametric object, it 
may be messing up the rest of the CSG by only finding the first 
intersection. Or it might just be that they don't work in difference or 
intersection...similar to the limitation on bezier patches, polygons, 
etc...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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