Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 837 results for
bouncing
- Page 1
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by vortex_1
In my opinion, implementing a feature in a
bouncing
balls simulation where a new ball is created when …aspects of the simulation. If the primary goal of the
bouncing
balls simulation is to accurately model and demonstrate the physics…new ball is created when two balls collide in a
bouncing
balls simulation should be based on the intended purpose …
Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
… static void main( String args[] ) { JFrame frame = new JFrame( "
Bouncing
Balls" ); Ball b[] = new Ball[6]; b[0] = new…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
… static void main(String[] args) { JFrame frame = new JFrame( "
Bouncing
Balls" ); Ball[] b = new Ball[2]; // Start with 2…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
… static void main(String[] args) { JFrame frame = new JFrame("
Bouncing
Balls"); Ball[] b; // Start with 2 balls b = new…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Thank you so much for your reply and additions! It is certainly working as I wanted. I will read through the code you have added and ask you any questions I might have. I hope you don't mind. Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
I’ll mark this question solved :)
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
… oh, sorry, missed the bit about you still needing clarifications. Feel feee to ask :) I’ll now unmark this topic as solved. /facepalm
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
Yes, this is true. Overlapping ball spawns can do that causing a chain reaction. Something like that could be done. How you handle the spawning of the new ball is what I played with a bit before. You will see better collision detection changing to: g.fillOval(ball.getX(), ball.getY(), 1 * ball.getRadius(), 1 * ball.getRadius());
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Got it. Thank you so much!
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Great reply, vortex! Agree with all your points.
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by aishamushtaq
Hi, Its helpful for me. I got my answer.
Bouncing ball Program
Programming
Software Development
16 Years Ago
by D boss
…x + " y = " + r.y + "
bouncing
= " +
bouncing
); } class B1 implements ActionListener { public void actionPerformed(ActionEvent e) { t…implements ActionListener { public void actionPerformed(ActionEvent e) { if (!
bouncing
) t.suspend();
bouncing
= true; y_shift *= -1; x_shift *= -1;…
Bouncing and forcing frames
Digital Media
UI / UX Design
19 Years Ago
by Slade
I have to know the definition of
Bouncing
and Forcing frames for some work I have to do... what does each do? I'm not sure all I get when I look in google is stuff about
bouncing
balls. Thanks in advance Slade
Bouncing Text using loop(any loop)
Programming
Software Development
13 Years Ago
by Karasuma
is it possible to create a
bouncing
text using a loop(any loop(for, while, or do … start the program.. but my problem is how to start
bouncing
the text and how to end... any help will do…
Re: Bouncing Text using loop(any loop)
Programming
Software Development
13 Years Ago
by Intrade
… (can be dummy mass like 1), its upward acceleration from
bouncing
off the ground, and its desired final return height on… its way up from
bouncing
off of the ground. You might need some more info…
Re: Bouncing and forcing frames
Digital Media
UI / UX Design
19 Years Ago
by BinaryMayhem
ive heard of forcing frames... not
bouncing
tho.... [example here] [url]http://www.webreference.com/js/column36/forcing.html[/url] I hope that clarifies something.
bouncing ball?
Programming
Software Development
18 Years Ago
by Acidburn
Having coded a
bouncing
ball in VB - not to exciting, I'm wondering how hard it would be to code that in c#? Anyone got a good place to start? Thanks :-)
Bouncing Ball (Dev C++ GUI code)
Programming
Software Development
19 Years Ago
by vegaseat
… "Hello World" is to the console, the "
Bouncing
Ball" is to the Graphical User Interface. Nothing fancy…
Re: Bouncing Ball (Dev C++ GUI code)
Programming
Software Development
16 Years Ago
by lucamarcus
… a new c++ programmer. I refer to the code "
Bouncing
Ball" which is a GUI, now there is a…
bouncing ball problem
Programming
Software Development
12 Years Ago
by masre
hey everyone, m doing an assignment on
bouncing
ball,my code below doesn't bounce the ball,it …
Re: Multiple Bouncing Balls
Programming
Software Development
15 Years Ago
by Alex Edwards
…false; //yUp = false; //xDx = 1; //yDy = 1;
bouncing
= true; addMouseListener( this ); Thread repaintThread = new Thread(rt); … void paint( Graphics g ) { super.paint( g ); if (
bouncing
) { g.setColor( Color.blue ); for(MyThread element : blueBall){…
Multiple Bouncing Balls
Programming
Software Development
15 Years Ago
by AllenB
…; xDx = 1; yDy = 1; addMouseListener( this );
bouncing
= false; } public void mousePressed( MouseEvent e ) { …position blueBall[ballcount] = new Thread( this );
bouncing
= true; blueBall[ballcount].start(); ballcount++; } }…
Threads/Bouncing Balls
Programming
Software Development
13 Years Ago
by sciprog1
…false; yUp = false; xDx = 1; yDy = 1;
bouncing
= true; setOpaque(false); setPreferredSize(new Dimension( MAX_X, MAX_Y)); …public void paintComponent(Graphics g) { super.paintComponent(g); if (
bouncing
) { g.setColor( Color.blue ); g.fillOval( x, y…
Re: Threads/Bouncing Balls
Programming
Software Development
13 Years Ago
by Taywin
sciprog1: If a ball is a thread, you should implement the collision detection inside the Ball class, but you need to pass the boundary from
Bouncing
Ball display to it as well. Currently, it is done inside Ball class too, but the boundary is off (MAX_X and MAX_Y). The size of display panel may not be the same as the real boundary size.
Re: Threads/Bouncing Balls
Programming
Software Development
13 Years Ago
by sciprog1
… the reply! If we take the case of three balls
bouncing
, where and how would I check for collission in the…
Breakout Ball bouncing physics
Programming
Game Development
15 Years Ago
by CoolGamer48
…, and I'm having some trouble thinking of the ball
bouncing
physics. The way I've made breakout games before was… just at 45 degree angles. The way I see it,
bouncing
against non-moving blocks will not change the direction that…
Re: Breakout Ball bouncing physics
Programming
Game Development
15 Years Ago
by CoolGamer48
Wthe ball hits the side of the paddle, it ussualy just goes through the paddle and starts spazing, and then comes out when I move the paddle away.
Bouncing
on the top side works well, but I have some issues with bottom
bouncing
as well (when the ball moves below the paddle it starts moving straight until it moves out from under the paddle).
Re: Breakout Ball bouncing physics
Programming
Game Development
15 Years Ago
by CoolGamer48
Hey, I have some code for
bouncing
. It works well most of the time but there are …
RE:" THE BOUNCING BALL in C++"
Programming
Software Development
16 Years Ago
by lucamarcus
… a new c++ programmer. I refer to the code "
Bouncing
Ball" which is a GUI, now there is a…
1
2
3
14
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC