File:Hypozykloide 12x.PNG

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

Original file (826 × 617 pixels, file size: 473 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Hypocycloid
Date
Source own work, build with POV-Ray 3.5
Author NobbiP
Other versions
// Hypocycloid made for wiki with POV-Ray 3.5 by NobbiP - download at http://www.povray.org

//************************************
//***** variables and parameters *****

//  if you want to draw an animation, the following 4 lines should be placed at the end of 'POVRAY.INI' (without the 2 slahes in front of the lines)
//  if you wand to draw a single picture comment this lines out by a leaving ';' or delete this lines !

//Initial_Frame =    0 // should ever be 0
//Final_Frame   =   90 // number of frames you want (for longer animations, with more steps increase the value and vice versa)
//Initial_Clock =    0 // should ever be 0
//Final_Clock   = 3240 // number of circles, loops multiplied by 360

// Formua to find the number of drawn loops : gcd = greatest common divisor, German: ggT = größter gemeinsamer Teiler
//
//            ra
//  n = -------------- 
//      gcd ( ra, ri )

// Formua to find the number of full turns of the inner circle to complete the loops : lcm = lowest common multiple, German: kgV = kleinstes gemeinsames Vielfaches 
//
//      lcm ( ra, ri )
//  m = --------------
//           ra

/*
examples:

   "n"   |   "m"   |   "ra"   |   "ri"   |  gcd/ggT | lcm/kgV | possible other "ri" (for ra=9)

    2         1          9        4.5         4.5         9     -
    3         1          9        3           3           9     6 -
    4         1          9        2.25        2.25        9     6.75 -
    5         1          9        1.8         1.8         9     3.6, 7.2 -
    6         1          9        1.5         1.5         9     7.5 -
    7         1          9       "9/7"       "9/7"        9     (2..6)*(9/7)
    8         1          9        1.125       1.125       9     2.25, 3.375, 5.625, 6.75, 7,875 -
    9         2          9        2           1          18     1, 4, 5, 7, 8 -
   10         3          9        2.7         0.9        27     0.9, 3.6, 5.4, 6.3. 7.2, 8.1 -
   12         5          9        3.75        0.75       45     0.75, 5.25, 11.25 -
   36         7          9        1.75        0.25       63     x*(1/36)
  100         1          9        0.09        0.09        9     x*0.09
  100         7          9        1.89        0.09       63     x*0.09

*/

// Parameters to modify

// Parameter instructions
//   flag_xxx   -> flag 0 or 1
//   i_xxx      -> integer
//   float_xxx  -> normal variable
//   col_xxx    -> RGB-color 3 float variables 0...1 each in the form <red,green,blue>

#local flag_only_hypo   = 0                  ; // if set, only the draw of the outer cycloide will drawn, nothing else
#local flag_ani         = 0                  ; // do you want to draw an animation or a single picture (complete drawn) 0 means single pic, 1 means animation
#local flag_out         = 1                  ; // show a longer hypocycloid             - suggestion 1 (0 means off)
#local flag_in          = 1                  ; // show a shorter hypocycloid            - suggestion 1 (0 means off)
#local float_r_out      = 9                  ; // "ra" radius stator                    - suggestion 9 and not to change
#local float_r_in       = 3.75               ; // "ri" radius rotor                     - suggestion 1 ... 5 (see also table above)
#local i_counter        = 360*12             ; // counter in while-loop, should be equal to the number of circles or loops and multiplied by 360 - suggestion [360*] 9 (*)
                                             ; // make sure for a complete drawing that you use at least 360 * m (formula for m see above)
#local float_r_in1      = float_r_in*1.5     ; // radius 'pen' for longer hypocycloid   - suggestion 1..2 times of float_r_in
#local float_r_in2      = float_r_in*0.5     ; // radius 'pen' for shorter hypocycloid  - suggestion half of float_r_in (or float_r_in - x, Range >0 ... <float_r_in)
#local float_r_sphere   = 0.05               ; // radius of the 'dottet write line'     - suggestion 0.05
#local col_backgr       = rgb<0.9,0.9,0.9>   ; // color of the background               - suggestion <0.9,0.9,0.9> light gray
#local col_inside       = rgb<1.0,1.0,1.0>   ; // color inside the stator               - suggestion <1.0,1.0,1.0> white
#local col_stator       = rgb<1.0,1.0,0.0>   ; // color of the stator                   - suggestion <1.0,1.0,0.6> very light yellow
#local col_rotor1       = rgb<1.0,0.3,0.3>   ; // color of 1st 2 quarters of the stator - suggestion <1.0,0.3,0.3> light red
#local col_rotor2       = rgb<0.3,0.3,1.0>   ; // color of 2nd 2 quarters of the stator - suggestion <0.3,0.3,1.0> light blue
#local col_line_1       = rgb<1.0,0.0,0.0>   ; // color of 1st or longer line           - suggestion <1.0,0.0,0.0> red
#local col_line_2       = rgb<0.0,0.0,1.0>   ; // color of 2nd or shorter line          - suggestion <0.0,0.0,1.0> blue

// DO NOT MODIFY BELOW OF THIS LINE

#local i_phi            = clock                         ; // actual number of frame to draw, used only for animation - do not modify !
#local float_u_phi_i    = pi * 2*float_r_in             ; // perimeter rotor calculatd by radius - do not modify !
#local float_u_phi_o    = pi * 2*float_r_out            ; // perimeter stator calculatd by radius - do not modify !

#local float_div_ro_ri  = float_u_phi_o / float_u_phi_i ; // number of division stator by rotor - do not modify !
#local float_phi_delta  = i_phi / float_div_ro_ri       ; // angle of the rotor on its way araound - do not modify !

#local CUT              = 999                           ; // cut away size - do not modify !

#if (flag_only_hypo)
  #local flag_in        = 0                  ; // inner cycloide will be drawn
#end

//******************
//***** camera *****

camera {
  location  < 0, 0, -250 > look_at < 0, 0, 0 > angle 7  // default
}

//******************
//***** lights *****

light_source { <  0, 0, -100 > color rgb<1.0,1.0,1.0>*1.5 shadowless }

#if (flag_only_hypo)
  background { rgb <1.0,1.0,1.0> } // white
#else
  background { col_backgr } // rgb <1.0,1.0,1.0> }
#end

//******************
//***** objects ****

#if (!flag_only_hypo)

difference {                                    // stator
  cylinder { <0,0,0.1999><0,0,0.2>float_r_out*1.05 }
  cylinder { <0,0,-CUT><0,0,CUT>float_r_out }
  pigment { col_stator }
}

cylinder { <0,0,0.2><0,0,0.2001>float_r_out     // color inside stator
  pigment { col_inside }
}

union {
  difference {                                  // black arrow in background
    cylinder { <0,0,0><0,0,0.2>2.5 }
    cylinder { <0,0,-CUT><0,0,CUT>2.4 }
    box      { -CUT<CUT,0,CUT> }
    box      {  CUT<0,-CUT,-CUT> }
  }
  cone {<-2.45,0,0.2>0.2<-2.45,-0.3,0.2>0}
  rotate 135*z
  pigment {rgb<0.0,0.0,0.0>}
}

union {
  difference {                                  // 1st 2 quarters of rotor
    cylinder { <0,0,0.1999><0,0,0.2>float_r_in}
    box{-CUT<0,0, CUT>}
    box{ CUT<0,0,-CUT>}
    pigment {col_rotor1}
    rotate 45*z
  }
  difference {                                  // 2nd 2 quarters
    cylinder { <0,0,0.1999><0,0,0.2>float_r_in}
    box{-CUT<0,0, CUT>}
    box{ CUT<0,0,-CUT>}
    pigment {col_rotor2}
    rotate -45*z
  }
  union {
    difference {                                // white arrow on rotor
      cylinder { <0,0,0><0,0,-0.01>1.0 }
      cylinder { <0,0,-CUT><0,0,CUT>0.9 }
      box      { -CUT<CUT,0,CUT> }
      box      {  CUT<0,-CUT,-CUT> }
    }
    cone {<0,0.95,0>0.2<0.3,0.95,0>0}
    rotate 75*z
    pigment {rgb<1.0,1.0,1.0>}
  }
  union {                                       // black arms / 'penholder'
    #if ( flag_out = 1 )
      box      {<-0.04,0,0><0.04,float_r_in1-0.2,-0.01>}
    #end
    #if ( flag_in = 1 )
      box      {< 0,-0.04,0><float_r_in2-0.2,0.04,-0.01>}
    #end
    cylinder {< 0,0,0><0,0,-0.01>0.04}
    pigment {rgb<0.0,0.0,0.0>}
  }
  #if ( flag_out = 1 )
    difference {                                  // pointer on line 1
      cylinder {< 0,float_r_in1,-0.1><0,float_r_in1,-0.02>0.2}
      cylinder {< 0,float_r_in1,-CUT><0,float_r_in1,CUT>0.1}
      pigment {col_line_1}
    }
  #end
  #if ( flag_in = 1 )
    difference {                                  // pointer on line 2
      cylinder {<float_r_in2,0,-0.1><float_r_in2,0,-0.02>0.2}
      cylinder {<float_r_in2,0,-CUT><float_r_in2,0,CUT>0.1}
      pigment {col_line_2}
    }
  #end
  rotate -i_phi*z
  translate < 0, float_r_out-float_r_in, 0 >
  rotate float_phi_delta*z
}

#end

#if (flag_ani = 1)                              // use 'i_phi' for animation or 'i_counter' for static fulldrawn lines on single picture
  #local loopcount = i_phi ;
#else
  #local loopcount = i_counter ;
#end

#local i = 0 ;                                  // loop counter for both lines
#while (i < loopcount)
  #if ( flag_out = 1 )
    sphere {<0,float_r_in1,0>float_r_sphere
    rotate -i*z
    translate < 0, float_r_out-float_r_in, 0 >
    rotate i/float_div_ro_ri*z
    pigment {col_line_1}
  }
  #end
  #if ( flag_in = 1 )                           // 2nd line drawing
    sphere {<float_r_in2,0,0>float_r_sphere
    rotate -i*z
    #local _px = i * float_u_phi_i / 360 ;  
    translate < 0, float_r_out-float_r_in, 0 >
    pigment {col_line_2}
    #local phiux = i / float_div_ro_ri ;
    rotate phiux*z
  }
  #end
  #local i = i + 0.5 ;
#end

Licensing

[edit]
I, NobbiP, the copyright holder of this work, hereby publishes it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Attribution: I, NobbiP
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.
This licensing tag was added to this file as part of the GFDL licensing update.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic, 2.0 Generic and 1.0 Generic license.
Attribution: I, NobbiP
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.
You may select the license of your choice.

File history

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

Date/TimeThumbnailDimensionsUserComment
current14:37, 6 September 2019Thumbnail for version as of 14:37, 6 September 2019826 × 617 (473 KB)ديفيد عادل وهبة خليل 2 (talk | contribs)== {{int:filedesc}} == {{Information |Description={{en|Hypocycloid}} |Source=own work, build with POV-Ray 3.5 |Date=2014-10-05 |Author=NobbiP |Permission= |other_versions= <gallery> Hypozykloide 12 (3.75-9).jpg | variant with 12 loops Hypozykloide 12x.jpg|jpg </gallery> }} // Hypocycloid made for wiki with POV-Ray 3.5 by NobbiP - download at http://www.povray.org //************************************ //***** variables and parameters ***** // if you want to draw an a...

The following page uses this file:

Metadata