File:Logarithmic spiral povray 3 r1.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,600 × 1,600 pixels, file size: 347 KB, MIME type: image/png)

Captions

Captions

Logarithmic spiral function with POV-Ray 3

Summary

[edit]
Description
English: Logarithmic spiral function with POV-Ray
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code

// // logarithmic spiral function // // POV-Ray 3.7 source code // // 23.6.2023 0000.0001 //

  1. include "functions.inc"

global_settings { assumed_gamma 1

}

light_source {<1, 1,-5/10>*1000*1000*1000 color <1,1,2>*3}


light_source {<-1, -1,-1/10>*1000*1000*1000 color <2,1,1>*3}

camera {

   location <0, 0, -10>
   right 1
   up 1
   angle 25
   look_at 0 

}

background {color rgb <1/2,1/2,1> }


  // logarithmic spiral 0
  1. declare logspiral0=function {
    (1*log(sqrt(x*x+y*y))*pi*2)+10*(atan2(x,y)/(pi/2))

}

  // logarithmic spiral 1
  1. declare logspiral1=function {
  ((sin(logspiral0(x,y,z)*2*pi)/2)+0.5)   

}


  // logarithmic spiral 2
  1. declare logspiral2=function {
max(   min( (  ((sin((3*log(sqrt( (x*x+y*y) ))*pi*2)+((atan2(x,y))/(pi*2))*2*pi)/2)+0.5) ) ,1),0)  

}


  1. declare surf1=function {

pigment {

   function {


(logspiral2(x,y,z))


   } 
      
         color_map {
         [0.00 color rgb <0,0,1>]
          [0.5  color rgb <1/2,1/2,1/2>]
         [1.00 color rgb <1,1,1>]
       }  

}

}



  1. declare surfpig1= pigment {
 function {
   surf1(x,y,z).gray 

 }
       color_map {
         [0.00 color rgbt <1,1/5,0,0>]
         [1.00 color rgbt <1,1,0.0,0>]
       }    

}

  1. declare surftex1=texture {
  pigment {
   surfpig1

}

// normal {function { surf1(x,y,z).gray }}

finish { phong 1 }

}

  1. declare object1=object {

plane {z,0}

//sphere {0,1 }

texture {surftex1}

}

object {object1}

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:56, 23 June 2023Thumbnail for version as of 11:56, 23 June 20231,600 × 1,600 (347 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata