• Showing Page History #21104

class l4p5

static utilities collection, drawing the Loc objects to P5's sketch

coded by Classiclll on 08/07/20

test applet and codes are here

  1. [initial setting, always needed]
  2. void setup(PApplet parent)
  3. [Processing's primitives]
  4. void translate(Loc l)
  5. void translate(Rod r)
  6. void translate(Tag t)
  7. void translate(Ship t)
  8. void line2D(Loc s, Loc t)
  9. void line2D(Rod r)
  10. void line(Loc s, Loc t)
  11. void line(Rod r)
  12. void vertex(Loc l)
  13. void vertex(Loc l, float u, float v)
  14. void vertex2D(Loc l)
  15. void vertex2D(Loc l, float u, float v)
  16. void bezierVertex(Loc l, Loc m, float x, float y, float z)
  17. void bezierVertex2D(Loc l, Loc m, float x, float y)
  18. void ellipse(Loc l, float width, float height)
  19. void ellipse(Rod r)
  20. void ellipse(Tag t)
  21. void rect(Loc l, float width, float height)
  22. void rect(Rod r)
  23. void rect(Tag t)
  24. void point(Loc l)
  25. void point2D(Loc l)
  26. void box(Loc l, float width, float height, float depth)
  27. void box(Rod r)
  28. void box(Ship s)
  29. void sphere(Loc l, float radius)
  30. void sphere(Rod r)
  31. [Extended stufs]
  32. void polygon(Loc[] at)
  33. void polygon(Loc[] at, PImage img)
  34. [Texture Mapped 3D Primitives. coded by Classiclll on 5/1/2006]
  35. "dim" is the degree of detail of each shapes (positive odd number)
  36. [Capsules]
  37. void tmdSphere(float radius, PImage img)
  38. void tmdOctahedron(float radius, PImage img)
  39. void tmdBarrel(float radius, PImage img)
  40. void tmdCapsule(int dim, float radius, PImage img)
  41. [Tubes]
  42. void tmdBox(float len, PImage img)
  43. void tmdHexapole(float radius, float len, PImage img)
  44. void tmdTube(int dim, float radius, float len, PImage img)
  45. [Cones]
  46. void tmdTetra(float len, PImage img)
  47. void tmdCone(float radius, float len, PImage img)
  48. void tmdCone(int dim, float radius, float len, PImage img)
  49. [Torus]
  50. // To Do