Lavf XXXXXXXXXX

1 answer below »
Please write code to replicate what you see in the attached video. MUST write notes explaining each step of the code. All code must be done in processing software, free software download at processing.orgWrite code as simple as you can, beginner level codeThank you!


Lavf58.12.100
Answered Same DayOct 26, 2021

Answer To: Lavf XXXXXXXXXX

Ramachandran answered on Oct 27 2021
114 Votes
Order-94743/sketch_211027a/sketch_211027a.pde
// ellipse x radius
int RADIUS_X = 60;
//ellipse y radius
in
t RADIUS_Y = 32;
//set the height of the range bar
int RANGE_BAR_HEIGHT = 80;
//max value in the range
int MAX_ROTATIONS = 36;
// variable to hold current rotation value
int currentRotation = MAX_ROTATIONS/2;
// range marker position
int currentRangePosition;
//text font size
int FONT_SIZE = 25;
//collection to hold details of all rotations so far
ArrayList rotations;
void setup() {
size(800, 800);
// initialize the range marker starting position
currentRangePosition = width/2;
//initialise the rotation list
rotations = new ArrayList<>();
//add the first Rotation object with initial values
Rotation rotation = new Rotation(currentRotation, width/2, height/2);
rotations.add(rotation);
}
void draw() {
background(255);
//update the title with rotation count
surface.setTitle("# of rotations = " + currentRotation);
//draw the range bar as a rectangle
noFill();
strokeWeight(2);
rect(0, 0, width, RANGE_BAR_HEIGHT);
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here