Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMP 1010 Lab 3 Material covered . Cantats and high and with . Active Processing (setup and draw) Se variables Defining simple functions Note: .

image text in transcribedimage text in transcribed

COMP 1010 Lab 3 Material covered . Cantats and high and with . Active Processing (setup and draw) Se variables Defining simple functions Note: . Make sure your To secuirded your mark before leaving . Remember that you caly need to do one of the these exerches Bronze, Silver, or Gold) sale 2/2 on the labs, although you are encouraged to do as many as you can The Goldegie depend on the Silver, but the lowercise is independent Write a drawing program that lets you make images like the one shown here. Circles should be drawn conticely to new one per frame), with their tres at the position. The color of the circles a shade of grey should be rolled by the vertical position of the black at the food the canvas, and white c255) at the bottom. The diameters of the circles should be cooled by the horisontal posities of the mowe - tiny (0cathe kell and full size (MAX_SIZE) the right 1. Create an Active Processing program and crea canvas window with a black background in the setup lock. Your program should work with a window of any site poure or rectangular 2. Create two global state valable size and shade, which will come the deter of the next circle and its shade of grey 3. Create a global content MAX_SIZE which will come the site of the largest circlesIn the example above. MAX_SIZE is set to 100 4 Define a sall function void drawCircle( ) which will draw a circle at the current moes Location using size and shade to its colour and diameter. Stadine a small function void setSizeAnd Shadet ) which will see the variabile size and shade according to the base position Note: The priceMAX_SIZE"mousex/Width will give you an awer that varies from Oto MAX_SIZE.mousex varies from width. Since we'd ning int variables only. it's important to write it this way. If you call mousex/width first you'll always got lut multiplying Xnous ex flestaves you a big number, and then dividing by width at the end will work and give you the night answer 6. Cill set sizeandskade() and drawCircle) in the smal draw() function cacocco ( LaboBronze CCCCC X COMP 1010 Lab 3 Material covered . Cantats and high and with . Active Processing (setup and draw) Se variables Defining simple functions Note: . Make sure your To secuirded your mark before leaving . Remember that you caly need to do one of the these exerches Bronze, Silver, or Gold) sale 2/2 on the labs, although you are encouraged to do as many as you can The Goldegie depend on the Silver, but the lowercise is independent Write a drawing program that lets you make images like the one shown here. Circles should be drawn conticely to new one per frame), with their tres at the position. The color of the circles a shade of grey should be rolled by the vertical position of the black at the food the canvas, and white c255) at the bottom. The diameters of the circles should be cooled by the horisontal posities of the mowe - tiny (0cathe kell and full size (MAX_SIZE) the right 1. Create an Active Processing program and crea canvas window with a black background in the setup lock. Your program should work with a window of any site poure or rectangular 2. Create two global state valable size and shade, which will come the deter of the next circle and its shade of grey 3. Create a global content MAX_SIZE which will come the site of the largest circlesIn the example above. MAX_SIZE is set to 100 4 Define a sall function void drawCircle( ) which will draw a circle at the current moes Location using size and shade to its colour and diameter. Stadine a small function void setSizeAnd Shadet ) which will see the variabile size and shade according to the base position Note: The priceMAX_SIZE"mousex/Width will give you an awer that varies from Oto MAX_SIZE.mousex varies from width. Since we'd ning int variables only. it's important to write it this way. If you call mousex/width first you'll always got lut multiplying Xnous ex flestaves you a big number, and then dividing by width at the end will work and give you the night answer 6. Cill set sizeandskade() and drawCircle) in the smal draw() function cacocco ( LaboBronze CCCCC X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago