I have to assignment and i need a little bit of help

edited November 2017 in Questions about Code

So i am new student to processing in general to graphics and i have an assignment that i need to finish it till next week here you can find simple video of the assignment : https://drive.google.com/file/d/1bIoKDPcOnvDjOzBPluSXyyNWYBHkFWOe/view

so i almost got everything but i have one problem when i drag the mouse it draws new points/lines/curves.. but i am asked just to move the original position.

so here is the pastebin for my code till now : https://pastebin.com/EDMYrDVD

i hope i can get some help from you guys cheer.

Thank you

Tagged:

Answers

  • edited November 2017 Answer ✓

    You should clear away what was drawn in a previous frame before you draw your next frame. It's like painting on a clean canvas verses painting on a painting - if you don't cover up what was previously drawn, it doesn't automatically go away.

    Add this line of code to the top of your draw() function:

    background(255);
    

    This will ensure you start drawing each frame with a clean canvas.

  • thanks mate that what i exactly did two hours ago and worked .. i never thought its only one line problem .. thank you anyway :)

Sign In or Register to comment.