POV-Ray : Newsgroups : povray.advanced-users : Beeing stupid... y=x*sin(1/x), how to? : Re: Beeing stupid... y=x*sin(1/x), how to? Server Time
30 Jul 2024 06:19:04 EDT (-0400)
  Re: Beeing stupid... y=x*sin(1/x), how to?  
From: Chris Huff
Date: 19 Dec 1999 19:51:17
Message: <chrishuff_99-2E2D41.19515619121999@news.povray.org>
In article <MPG.12c7343caf4ca57d989687@news.povray.org>, Mario Splivalo 
<msp### [at] jagorsrcehr> wrote:

> > If you mean you want to make a kind of lathe, swept around the z axis, 
> > it would be pretty simple to do. One way would be to use an isosurface, 
> > with a function like:
> > function {z - sqrt(x^2 + y^2)*sin(1/sqrt(x^2 + y^2))}
> > replacing x with sqrt(x^2 + y^2), which is the distance from the z 
> > axis.
> 
> Yes, and I get nothing... Or I am doing something wrong ;(

What is the isosurface you are using? Try something like this:

#include "colors.inc"

camera {
   location <0, 3.5, -10>
   look_at <0, 0, 0>
   angle 35
}

isosurface {
   function {y - sqrt(x^2 + z^2)*sin(1/sqrt(x^2 + z^2))}
   eval                       
// max_gradient 1.1
   threshold 0
   bounded_by {box {<-2,-2, 0>, < 2, 2, 2>}}
   //Make a cross-section of the surface
   //use clipped_by to make just the surface visible
   accuracy 0.001
   texture {
      pigment {color rgb < 0.095, 0.44, 0.2 >}
      finish {ambient 0.35}
   }
   scale 2 rotate y*45
}

light_source {< -40, 75, -40> color White}

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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