Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
devc%2b%2b
- Page 1
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
4 Days Ago
by jprog1000
Got it. Thank you so much!
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
3 Days Ago
by vortex_1
In my opinion, implementing a feature in a bouncing balls simulation where a new ball is created when two balls collide can add an interesting and dynamic element to the simulation. This feature can introduce a sense of complexity and unpredictability, making the simulation more engaging and challenging for users. It could also provide an …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
3 Days 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
2 Days Ago
by Digital_39
Hi, Its helpful for me. I got my answer.
Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Hello, I have a program which creates multiple balls and bounces them off when they collide. This works fine. import java.awt.Rectangle; public class Ball{ private int x = 0; private int y = 0; private int radius; private int panelwidth = 500; private int panelheight = 500…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by toneewa
Some minor syntax fixes. Some things to consider are the collision and distance of drawing the next ball. A ball inside a ball's radius will cause numerous collisions. Even the starting ball locations can be already causing collisions. I added a collision counter display. Increased the maximum balls to make to 50. The timer delay can also impact …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by toneewa
I cleaned up the code some more. Removed some things that were not being used. I ran into a couple problems which caused the freeze you mentioned. It was memory heap space and array allocating. E.g., if x or y becomes negative, and also infinite recursion. I added a x/y coordinate display for a ball, and tinkered with the placement of the …
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
I was searching for Paris Olympics ticket prices for tennis games recently. The official website directs you to a [PDF document](https://tickets.paris2024.org/obj/media/FR-Paris2024/ticket-prices.pdf) containing ticket prices and venues for all the games. However, I found the PDF document to be very hard to navigate. To make things easier, I …
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
Seriously?! I need to go twice in a row b/c after almost two decades of this thread staying alive, no one's posted in 4 years? OK, fine ... snobby --> princess
VB2010- why i get a different vertical size\color on RayCasting?
Programming
Software Development
2 Weeks Ago
by cambalinho
these is the VB6 function for RayCasting: Private Sub DrawRays() Dim StepX As Double Dim StepY As Double Dim VertX As Double Dim VertY As Double Dim HorizX As Double Dim HorizY As Double Dim MapX As Long Dim MapY As Long…
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
3 Weeks Ago
by Salem
First, let's prepare two tar files using different compression schemes for demo purposes. $ cat foo_1.txt This is file 1 $ cat foo_2.txt This is file 2 This is file two This is file too # Three tar files, two compressed and one uncompressed for reference $ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt…
Re: How Build video-player in html And css ?
Programming
2 Weeks Ago
by Kirubel_2
body{ /* background: url(../img/w11.png); */ background: url(../img/m.jpg); background-size: cover; background-repeat: no-repeat; margin: 0; padding: 0; height: 101vh; overflow-y: hidden; } .container button{ background: transparent; …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week 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
1 Week Ago
by Dani
I’ll mark this question solved :)
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week 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
1 Week 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
1 Week 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: 88 Business-Growing Strategies
Digital Media
Digital Marketing
3 Weeks Ago
by henrymorgan9522
A growth strategy is an organization's plan for overcoming current and future challenges to realize its goals for expansion. Examples of growth strategy goals include increasing market share and revenue, acquiring assets, and improving the organization's products or services.
Re: Fantastic word game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
It's been a year so I'll go twice in a row. Corner that burglar before he gets away!
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Salem
princess -> castle
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
Castle —> Tower
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Salem
Tower-> Babel
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Read a Book
Babel -> JavaScript 🙌
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
JavaScript —-> react
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Salem
react -> chemistry
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
chemistry --> moles
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Salem
moles -> subterranean
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
subterranean --> termites
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Reverend Jim
termites --> clint As in "I have a pet termite named Clint. Clint eats wood".
Re: Word Association Game
Community Center
Geeks' Lounge
2 Weeks Ago
by Dani
Clint —> movies
1
2
3
17
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