POV-Ray : Newsgroups : povray.binaries.images : Drawing a line - attn kurtz le pirate : Drawing a line - attn kurtz le pirate Server Time
24 Apr 2024 16:43:22 EDT (-0400)
  Drawing a line - attn kurtz le pirate  
From: Bald Eagle
Date: 12 Oct 2019 21:00:01
Message: <web.5da2767e99a8678a4eec112d0@news.povray.org>
Like so:

 #version 3.8;
 global_settings {assumed_gamma 1.0 }
 #include "colors.inc"

#declare Aspect = image_width/image_height;

 camera {
  location <0, 0, -15>
  right x*Aspect
  look_at <0, 0, 0>
 }

light_source {<0, 5, -10> color White}

plane {z, 1 pigment {White*0.2}}

#declare Line = 0.015;
#declare LinePigment = pigment {Yellow+White/2}


#declare P1 = <-3, 0, 0>;
#declare P2 = < 3, 0, 0>;
#declare Vector = P2-P1;

#declare D = vlength (Vector);
#declare N = vnormalize (Vector);
#declare E = 0.000001;

#for (M, 0, D, D/20)   // clock simulator
 union {
  sphere {P1, 0.1 pigment {Red}}
  sphere {P2, 0.1 pigment {Green}}
  cylinder {0, N*M+(x*E), Line translate P1}
  translate y*5.5
  translate -y*M*2
  no_shadow
 }
#end


Post a reply to this message


Attachments:
Download 'drawline.png' (336 KB)

Preview of image 'drawline.png'
drawline.png


 

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