POV-Ray : Newsgroups : povray.advanced-users : ISO-CSG and blob threshold Server Time
25 Nov 2024 19:31:48 EST (-0500)
  ISO-CSG and blob threshold (Message 1 to 2 of 2)  
From: Reuben Pearse
Subject: ISO-CSG and blob threshold
Date: 30 Apr 2002 20:11:38
Message: <3ccf32ba@news.povray.org>
Hi all,

I am using the IsoCSG Library file (version 0.4) to create some rounded
shapes. I am using the blob_threshold technique to round off the inside
corner where 2 rounded boxes meet at right-angles. However this also
produces a bulge on the outside corner. How do I create a smooth transition
on the inside of corner and avoid the bulge on the outside?

My code is below and a reference image can be found at:
http://www.pearse.co.uk/pov/blobtest.png

Also........if I am using IC_Threshold with a value of 0.2 for rounding the
"outer" corners of a shape what is equivalent blob_threshold value for
rounding the "inner" corners of a shape? Please see:
http://www.pearse.co.uk/pov/CB18_rmp5.png
as an example of what I am trying to do.

Thanks

Reuben
doo### [at] breathemailnet
=====================================================
//Blobtest

#version 3.5;

global_settings {
  assumed_gamma 1.0
}

background { color <0.750,0.500,0.300> }

camera {
  location    <0, 0, -15>
  look_at     <0, 0, 1.7>
  angle      30
}


light_source {
  <-1000, 1000, -5000>
  color rgb 1.2
}

#include "colors.inc"
#include "iso_rcsg.inc"


#declare fn_outsidebox1 = IC_Threshold( IC_Translate( IC_Box
(<-1.2,-1.2,-0.05>, <1.2,1.2,0.05>), 1.2*z), 0.2)
#declare fn_outsidebox2 = IC_Rotate (fn_outsidebox1, 90*y)

//Declare Blob_threshold
#declare Blob_threshold=0.03;

//Blob the boxes together
#declare fn_CB18 = function {
(1+Blob_threshold) -Blob_threshold^fn_outsidebox2(x,y,z) -Blob_threshold^fn_
outsidebox1(x,y,z)  }

#declare fn_XX= function { fn_CB18(x, y, z) }

#declare CB18_TEMP =
                     isosurface {
                       function { fn_XX(x, y, z) }
                       max_gradient 5
                       accuracy 0.01
                       contained_by { box { -8+z*5, 8+2*z } }
                       pigment { rgb <0, 0.2, 1.1> }
                       scale 1.2
                     }

object {
        CB18_TEMP
        rotate <0, -20, 0>
        rotate <-50, 0, 0>
        }


Post a reply to this message

From: Christoph Hormann
Subject: Re: ISO-CSG and blob threshold
Date: 2 May 2002 03:47:22
Message: <3CD0EF09.F01733FC@gmx.de>
Reuben Pearse wrote:
> 
> Hi all,
> 
> I am using the IsoCSG Library file (version 0.4) to create some rounded
> shapes. I am using the blob_threshold technique to round off the inside
> corner where 2 rounded boxes meet at right-angles. However this also
> produces a bulge on the outside corner. How do I create a smooth transition
> on the inside of corner and avoid the bulge on the outside?

This has nothing to do with IsoCSG in particular, it is an intrinsic feature of
blobbing overlapping shapes.  Try something like:

#declare fn_outsidebox1 = IC_Threshold( IC_Translate( IC_Box
(<-1.2,-1.2,-0.05>, <1.2,1.2,0.05>), 1.5*z), 0.2)
#declare fn_outsidebox2 = IC_Rotate (fn_outsidebox1, 90*y)

And you will see the bulge reduced.  However you will not achieve a perfectly round
and smooth transit this way, for this it is better to use a real CSG bow.

> 
> Also........if I am using IC_Threshold with a value of 0.2 for rounding the
> "outer" corners of a shape what is equivalent blob_threshold value for
> rounding the "inner" corners of a shape? Please see:
> http://www.pearse.co.uk/pov/CB18_rmp5.png
> as an example of what I am trying to do.

The radius introduced by 'blobbing' and those of iso_rcsg are something completely
different.  If you want to have correct results you will have to code it in real CSG
with cylinders, spheres, torii etc.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 26 Apr. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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