Hey, I'm new to the Java arena, and am trying to create an application (using JForm and JPanel) displaying a fireworks show. The problem is creating an explosion for the display. Does anyone have any recommendations for creating an explosion? I've been stuck on this for quite some time and thought I'd see if anyone had any recommendations. Thanks for any advice you can provide.
CaffeineCoder
0
Poster
Recommended Answers
Jump to Posthere you go buddy, this example has source code too.
http://javaboutique.internet.com/fireworks/
Jump to PostYou can use the following equation of projectile trajectory to make your explosions.
x = v*cos(a)*t
y = v*sin(a)*t - ½gt²Keep an array of 100 or so particles that will make up the firework. Given a random velocity (v) for each particle and a random angle (a). …
All 8 Replies
majestic0110
187
Nearly a Posting Virtuoso
CaffeineCoder
0
Poster
majestic0110
187
Nearly a Posting Virtuoso
Phaelax
52
Practically a Posting Shark
CaffeineCoder
0
Poster
CaffeineCoder
0
Poster
CaffeineCoder
0
Poster
cornmaster12
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.