Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

hey, I need help in computer processing. How do you get a shape to move according to the minute?

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

Explain?
In computer processing, I have to type a code that makes a certain shape (ex. ellipse) move after every minute. For example, the following code makes a circle move from left to right. My problem is that I need help typing a code that makes the ball move across the window according to the minute. float cx; float cy; final float DIAM = 20; float xSpeed = 1.0; void setup() { size(350, 250); smooth(); cx = DIAM / 2.0; cy = height / 2.0; } void draw() { background(255); fill(0, 128, 128); ellipse(cx, cy, DIAM, DIAM); cx = cx + xSpeed; if (cx > width - DIAM / 2.0) // about to go off sketch at the right { xSpeed = -xSpeed; } if (cx < DIAM / 2.0) // about to go off sketch at the left { xSpeed = -xSpeed; } }

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question