Advertisement
FoxyCorndog

povray graph

Mar 21st, 2012
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #declare graphHeight    = 50;
  2. #declare graphWidth     = 50;
  3. #declare incrementX     = -graphWidth  / 2;
  4. #declare incrementY     = -graphHeight / 2;
  5. #declare gridWidth      = 0.07;
  6. #declare axesWidth      = 0.5;
  7. #declare gridSpacing    = 2;
  8. #declare tickMarkLength = 1.5;
  9.  
  10. #declare graphXPos      = incrementX;
  11. #declare graphYPos      = incrementY;
  12.  
  13. camera
  14. {
  15.     location <0, 0, -graphHeight>
  16.     look_at <0, 0, 0>
  17. }
  18.  
  19. light_source
  20. {
  21.     <0, 0, -graphHeight>
  22.     color rgb <1, 1, 1>
  23. }
  24.  
  25. #while (incrementY < graphHeight / 2)
  26.    
  27.     #while (incrementX < graphWidth / 2)
  28.        
  29.         box
  30.         {
  31.             <(incrementX) - (gridWidth / 2), -tickMarkLength / 2, 0>
  32.             <(incrementX) + (gridWidth / 2), tickMarkLength / 2, 1>
  33.            
  34.             pigment
  35.             {
  36.                 color rgb <1, 1, 1>
  37.             }
  38.         }
  39.        
  40.         #declare incrementX = incrementX + 1;
  41.        
  42.     #end
  43.    
  44.     box
  45.     {
  46.         <-tickMarkLength / 2, incrementY - (gridWidth / 2), 0>
  47.         <tickMarkLength / 2, incrementY + (gridWidth / 2) , 1>
  48.        
  49.         pigment
  50.         {
  51.             color rgb <1, 1, 1>
  52.         }
  53.     }
  54.    
  55.     #declare incrementY = incrementY + 1;
  56.    
  57. #end
  58.  
  59. box
  60. {
  61.     <-axesWidth / 2, -(graphHeight / 2), 0>
  62.     <axesWidth / 2, graphHeight / 2, 0>
  63.    
  64.     pigment
  65.     {
  66.         color rgb <1, 0, 0>
  67.     }
  68. }
  69.  
  70. box
  71. {
  72.     <-(graphWidth / 2), -axesWidth / 2  , 0>
  73.     <(graphWidth / 2), axesWidth / 2, 1>
  74.    
  75.     pigment
  76.     {
  77.         color rgb <1, 0, 0>
  78.     }
  79. }
  80.  
  81. #declare varx     = 5;
  82. #declare vary     = 0;
  83. #declare varslope = 0;
  84.  
  85. #while (
  86.    
  87.    
  88.    
  89. #end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement