Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.core.PApplet;
- import processing.core.PShape;
- public class cnc extends PApplet{
- PShape star;
- public void setup() {
- size(800, 800, P3D);
- }
- public void draw() {
- background(51);
- star = createShape();
- star.vertex(0, 0, 0);
- star.vertex(200, 0);
- star.vertex(200, 0, 50);
- star.vertex(0, 0, 50);
- star.vertex(0, 0, 100);
- star.vertex(200, 0, 100);
- star.vertex(200, 0, 150);
- star.vertex(0, 0, 150);
- star.vertex(0, 0, 200);
- star.vertex(200, 0, 200);
- star.vertex(200, 0, 250);
- star.vertex(0, 0, 250);
- star.end();
- star.noFill();
- star.translate(mouseX, mouseY);
- shape(star);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment