View the step-by-step solution to:

How to use a procedure for Fireworks?

How to use a procedure for Fireworks? Consider the image of fireworks in a nighttime sky, a procedure called Burst that moves the pen to a random location on the screen, moves the pen color forward 256, and then draw a firework burst with a random size and number of rays. (Hint: You may want to add a minimum value to the random size and random number of rays to avoid having bursts that are too small or have too few rays.) The main procedure should call Burst multiple times to generate an image similar to the image below. Note: Because of the random values, your solution image will be different each time you run your program.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question