POV-Ray : Newsgroups : povray.binaries.images : Violins : Violins Server Time
18 Aug 2024 16:23:08 EDT (-0400)
  Violins  
From: Joshua English
Date: 3 Apr 2001 16:36:51
Message: <3ACA3429.3F2FD11F@spiritone.com>
This image is regarding the discussion in .newusers about making a
violin shape.

Below are four images,
Upper Left: The violinshape object on its own.
Upper Right: The violinshape intersection with a cylinder.
Lower Left: The violinshape intersection with a sphere
Lower Right: The violinshape intersection with a torus.

Here is the code for the violinshape
#declare Violinshape =
difference {
  union {
    cylinder { <0,0,0.5> <0,1,0.5> 1 }
    cylinder { <0,0,-0.5> <0,1,-0.5> 1 }
    }
  cylinder { <0,-0.1,0> <0,1.1,0> 1 scale <0.25,1,0.5> translate -1*x }
  cylinder { <0,-0.1,0> <0,1.1,0> 1 scale <0.25,1,0.5> translate  1*x }
 }

#declare vpig = pigment { gradient y frequency 3.5 scallop_wave }

And here is the torus intersection (because I think it's the most
successful)

intersection {
  object { Violinshape }
  torus { 5,4 rotate 90*z translate -8*y }
  texture { pigment { vpig } finish { phong 1 } }
  translate <1.5,0,-1.5> }

Josh English
eng### [at] spiritonecom


Post a reply to this message


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

Preview of image 'violins.jpg'
violins.jpg


 

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