Subversion Repositories wimsdev

Rev

Rev 23 | Blame | Last modification | View Log | RSS feed

  1. <center><h3>Example of dynamic drawing.</h3></center>
  2.  
  3. The picture
  4. !set insdraw_size=150,150
  5. !set ins_align=middle
  6. !insdraw xrange -1.2,1.2\
  7. yrange -1.2,1.2\
  8. fill 0,0,skyblue\
  9. linewidth 2\
  10. polygon red,0,1,sin(4*pi/5),cos(4*pi/5),sin(8*pi/5),cos(8*pi/5),sin(2*pi/5),cos(2*pi/5),sin(6*pi/5),cos(6*pi/5)\
  11. fill 0,0,gold\
  12. fill 0,0.5,green\
  13. fill 0.5*sin(2*pi/5),0.5*cos(2 *pi/5),green\
  14. fill 0.5*sin(4*pi/5),0.5*cos(4*pi/5),green\
  15. fill 0.5*sin(6*pi/5),0.5*cos(6*pi/5),green\
  16. fill 0.5*sin(8*pi/5),0.5*cos(8*pi/5),green
  17.  
  18.  is generated by the following command.
  19. <pre>
  20. \draw{150,150}{xrange -1.2,1.2
  21. yrange -1.2,1.2
  22. fill 0,0,skyblue
  23. linewidth 2
  24. polygon red,0,1,sin(4*pi/5),cos(4*pi/5),sin(8*pi/5),cos(8*pi/5),sin(2*pi/5),cos(2*pi/5),sin(6*pi/5),cos(6*pi/5)
  25. fill 0,0,gold
  26. fill 0,0.5,green
  27. fill 0.5*sin(2*pi/5),0.5*cos(2 *pi/5),green
  28. fill 0.5*sin(4*pi/5),0.5*cos(4*pi/5),green
  29. fill 0.5*sin(6*pi/5),0.5*cos(6*pi/5),green
  30. fill 0.5*sin(8*pi/5),0.5*cos(8*pi/5),green
  31. }
  32. </pre>
  33. !href cmd=help&special_parm=draw Syntax of the commands.
  34. <p>