File:Spring2.png

File information
Description

A right-handed Spring

Source

Own work

Date
Author

Zom-B (talk) (Uploads)

Permission
(Reusing this file)

See below.

Additional information Pov-ray source code:
#include "colors.inc"
#include "shapes.inc"

global_settings {
  assumed_gamma 1.0
  max_trace_level 3
  ambient_light 1
}

#declare simple = texture {
  pigment { color<0, 0, 1, 0, 0.5> }
  finish { specular .5 phong .5 phong_size 250}
}

#declare p_radius = 0.25;
#declare w_radius = 0.01;
#declare p_torus = 0.5;
#declare p_spiral = 1;

camera {
  perspective
  location <-15, 0, 7>
  right x/0.75 up z sky z
  look_at  <0, 0, 2>
  angle 22
}

light_source {
  <2,2,2>
  color White
  parallel
  point_at <0,0,0>
}

light_source  {
  <-2,2,2>
  color White
  parallel
  point_at <0,0,0>
}

plane {
  z, -p_radius
  texture { pigment { checker White, <.8,.8,.8> } }
}

isosurface {
  function {  pow(p_torus-sqrt(x*x+y*y), 2) + pow((z + atan2(x,y)/3.14159*p_spiral), 2) }
  contained_by { box { <-p_torus-p_radius, -p_torus-p_radius, -p_spiral-p_radius>, <p_torus+p_radius, p_torus+p_radius, p_spiral+p_radius> } }

  threshold p_radius*p_radius
  accuracy 0.01
  max_gradient 770
  open

  translate <0, 0, 1>
  texture { simple }
}

isosurface {
  function {  pow(p_torus-sqrt(x*x+y*y), 2) + pow((z + atan2(x,y)/3.14159*p_spiral), 2) }
  contained_by { box { <-p_torus-p_radius, -p_torus-p_radius, -p_spiral-p_radius>, <p_torus+p_radius, p_torus+p_radius, p_spiral+p_radius> } }

  threshold p_radius*p_radius
  accuracy 0.01
  max_gradient 770
  open

  translate <0, 0, 3>
  texture { simple }
}

isosurface {
  function {  pow(p_torus-sqrt(x*x+y*y), 2) + pow((z + atan2(x,y)/3.14159*p_spiral), 2) }
  contained_by { box { <-p_torus-w_radius, -p_torus-w_radius, -p_spiral-w_radius>, <p_torus+w_radius, p_torus+w_radius, p_spiral+w_radius> } }

  threshold w_radius*w_radius
  accuracy 0.01
  max_gradient 770
  open

  translate <0, 0, 1>
  texture { pigment { Black } }
}

isosurface {
  function {  pow(p_torus-sqrt(x*x+y*y), 2) + pow((z + atan2(x,y)/3.14159*p_spiral), 2) }
  contained_by { box { <-p_torus-w_radius, -p_torus-w_radius, -p_spiral-w_radius>, <p_torus+w_radius, p_torus+w_radius, p_spiral+w_radius> } }

  threshold w_radius*w_radius
  accuracy 0.01
  max_gradient 770
  open

  translate <0, 0, 3>
  texture { pigment { Black } }
}

#declare py=0;
#while (py <= 4)
  #declare ph=py*3.141593;
  #declare ph2=py*180+90;
  torus {
    p_torus/2, w_radius
    rotate z*ph2
    translate <p_torus*sin(ph), -p_torus*cos(ph), py*p_spiral>

    texture { pigment { Black } }
  }

  #declare py = py + 1/10;
#end

Licensing

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.