games Open Menu Banner Image Draw Points To Target a2

drawPointsToTarget function method processing p5 steady distance steps big acheivement clockwise anti-clockwise counter-clockwise current direction angle target minimum happy working optimization logic java

Scrapbook / Draw Points To Target a2
-0001/11/30 00:11:00

This applet focuses around the method drawPointsToTarget() which draws a series of points towards a target restrained by a maximum turn angle and a steady set of distanced steps. The big acheivement for me in this version is correctly calculating which way (ClockWise or Counter-ClockWise) to turn, based on the current direction and the angle to the target. I'm just happy it works right now.

Feel free to look over the code and spot any optimizations I can make to the logic.

You need to have Java installed for this applet to work correctly.