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
2 Nov 2024 09:21:50 EDT (-0400)
  Re: Beeing stupid... y=x*sin(1/x), how to?  
From: Mario Splivalo
Date: 19 Dec 1999 19:27:36
Message: <MPG.12c73490f3b14807989688@news.povray.org>
In article <385845FC.F5F68C0E@ij.net>, jul### [at] ijnet says...
> Mario Splivalo wrote:
> 
> > Anyone, please, i'd love to plot a graph of the function, well, it's like
> > this:
> >
> > I have y = x * sin(1/x), and its some graph in 2D, Well, now i want to
> > rotate that graph around the z-axe (one pointing up/down), and represent
> > that in POV. Is that possible withouht 3rd party programs/utils?
> 
>     2D plot
> 
> #declare i = .001 ;
> #declare inc = 10 ;
> 
> #while (i<inc)
> sphere { 0.0, .005 translate <i,i*sin(2*pi/i),0>
> texture{pigment {radial frequency 8} finish{specular 1}} }
> 
> #declare i = i + 1/1000 ;
> #end
> 
> And a 3D version if interested
> 
> #declare i = .001 ;
> #declare inc = 10 ;
> 
> #while (i<inc)
> sphere { 0.0, .005 translate <i,i*sin(2*pi/i),i*cos(2*pi/i)>
> texture{pigment {radial frequency 8} finish{specular 1}} }
> 
> #declare i = i + 1/1000 ;
> #end
> 
>     Take the 2D version out to some value of x and then bring it back to zero
> along i*sin(2*pi/i)+.00001 or a larger number if you want a noticable
> thickness.
> 
>     But instead of plotting it, write the x and y values to a file, search on
> File I/O to learn that. Then import the file and tag it as a surface of
> rotation, SOR.

Hm, yes, it does, but, when making an fly-trough animation, it looks 
ditch....

Can it be done using cubic, quadric, or quatric, or matrix, or something/

	Mike


Post a reply to this message

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