POV-Ray : Newsgroups : povray.newusers : Rounded Edges Question Server Time
4 Nov 2024 19:21:53 EST (-0500)
  Rounded Edges Question (Message 1 to 4 of 4)  
From: Bob
Subject: Rounded Edges Question
Date: 19 Jun 2003 06:35:29
Message: <3ef191f1@news.povray.org>
I've stole from one of the sample files this object:

prism {
            linear_sweep
            bezier_spline 0,0.25,24
            <0,-1><0,-1><0.5,-0.3><0.7,-0.1>
            <0.7,-0.1><0.9,0.1><0.9,0.6><0.5,0.6>
            <0.5,0.6><0.1,0.6><0.1,0.2><0,0.2>
            <0,0.2><-0.1,0.2><-0.1,0.6><-0.5,0.6>
            <-0.5,0.6><-0.9,0.6><-0.9,0.1><-0.7,-0.1>
            <-0.7,-0.1><-0.5,-0.3><0,-1><0,-1>
            sturm
            pigment {color rgbf <1,0,0,.5>}
            rotate<-90,0,0>
            scale 2
            translate <0,2.75,.58>
}

If you'd trace that it's a heart, one question, is there any way to round
the edges off instead of having sharp edges without having to switch to a
different object?


Post a reply to this message

From: Peter Hertel
Subject: Re: Rounded Edges Question
Date: 19 Jun 2003 14:12:10
Message: <3ef1fcfa@news.povray.org>
> If you'd trace that it's a heart, one question, is there any way to
round
> the edges off instead of having sharp edges without having to switch
to a
> different object?

No..

But you can use the heart function (isosurface f_heart - 7.7.2 in the
DOCS) instead.
I remember someone posted a macro for rounding off objects like prisms,
a while back.. never tested it though..

Hope that helps.

-Peter


Post a reply to this message

From: JC (Exether)
Subject: Re: Rounded Edges Question
Date: 20 Jun 2003 02:29:22
Message: <3EF2A9C1.6080005@spam.fr>
This makes me post this excellent isosurface tutorial from Mike :
http://www.econym.demon.co.uk/isotut/

You will find the heart you look for somewhere along these pages.

JC


Peter Hertel wrote:
>>If you'd trace that it's a heart, one question, is there any way to
> 
> round
> 
>>the edges off instead of having sharp edges without having to switch
> 
> to a
> 
>>different object?
> 
> 
> No..
> 
> But you can use the heart function (isosurface f_heart - 7.7.2 in the
> DOCS) instead.
> I remember someone posted a macro for rounding off objects like prisms,
> a while back.. never tested it though..
> 
> Hope that helps.
> 
> -Peter
> 
>


Post a reply to this message

From:
Subject: Re: Rounded Edges Question
Date: 23 Jun 2003 23:21:20
Message: <3ef7c3b0$1@news.povray.org>
//  Hi Bob,
//
//  the macro mentioned by Peter probably is mine.
//
//  Example picture:
//     povray.binaries.images, 23rd and 26th January 2003
//     "Round/bevel: include file demo [51 KB JPG]"
//  Include file and "slide show" demo:
//     povray.binaries.scene-files, 23rd January
//     "Round/bevel: Include file"
//  Tutorial:
//     same thread, 26th January
//     "Round/bevel: Mini-Tutorial; Test-Arena"
//
//  A heart is no problem, but the shape is sort of
//  "circular/linear spline", so it is incompatible with
//  bezier_spline. For a simple object like a heart this
//  is a bit overkill; what about this:



//=== macro for a heart ===============================================
//
// Round: radius of rounded corners, >0
// Thick: thickness, >2*Round

#macro Heart (Round, Thick)
  #local HalfHeart =
    intersection {
      merge {
        torus { 1-Round, Round translate        Round *y }
        torus { 1-Round, Round translate (Thick-Round)*y }
        cylinder { 0      ,  Thick       *y, 1-Round }
        cylinder { Round*y, (Thick-Round)*y, 1       }
        translate 0.5*y
        scale <1.7, 1, 1> // shape variations: replace 1.7 by 1 .. 2
        rotate -45*y      //                   replace -45 by 0 .. 70
        }
      plane { -x, 1E-5 }
      }

  merge {
    object { HalfHeart }
    object { HalfHeart scale <-1, 1, 1> }
    texture {
      pigment { color rgb <1, 0, 0> }
      finish { ambient .2 diffuse .6 specular .4 roughness 0.0005 }
      }
    // no "}" to allow appending modifiers

  #end//macro Heart


//=== example scene ===================================================

Heart ( .25, .6 ) translate <-0.3, 0, -0.7> }
Heart ( .05, .6 ) scale 0.35 translate <1.6, 0, -0.7> }


plane { y, -1 texture { pigment { color rgb 1 } finish { diffuse 1 } } }

//light_source { <-1500, 3500, -2000>, color rgb 1 }
light_source { < 1500, 3500, -1000>, color rgb 1 }

camera { location -12*z look_at 0 angle 20
  rotate <50, -20, 0> translate <0, 0, 0> }


// END ================================================================



//     Sputnik
//
//  ----------------------------

//  fr### [at] computermuseumfh-kielde
//  ----------------------------


Post a reply to this message

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