09-17-2024, 11:06 AM
Just now came across this little gem. Nice snippet, Terry!
Did you make any updates to this one?
- Dav
Did you make any updates to this one?
- Dav
|
How about some vector noodles?
|
|
09-17-2024, 11:06 AM
Just now came across this little gem. Nice snippet, Terry!
Did you make any updates to this one? - Dav
09-17-2024, 11:36 AM
All waaay above my head, but playing with this, I could see an interesting game possibly along the lines of "Clear the cobwebS", or something more catchy. Fun effect!
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.)
![]() Please visit my Website at: http://oldendayskids.blogspot.com/
Here is what a vector is:
Quote:What is the definition of a vector? Quote:TYPE PARTICLE ' PARTICLE PROPERTIES using 2 magnitutes xv, yv is not a vector but 2 components from which you can derive the vector magnitude and direction. Imagine a vector as an arrow on the screen or graph, the length of arrow represents the magnitude and the direction from base to arrow head is the angle or heading. So there are 2 points base location and head location (x1, y1) and (x2, y2) dx = (x2 - x1) : dy = (y2 - y1) are the vector COMPONENTS the magnitude of arrow or vector = SQR(dx^2 + dy^2) just the distance or length of the arrow, good old Pythagorean Theorem here. the angle or heading of arrow or vector = _Atan2(dy, dx) (so sorry for the Advanced Trig but easiest way to get there in Basic). Yes point locations can be considered vectors from the origin of a graph (x, y) can be polarized (ha my term meaning converted to Polar coodinates x = dx, y = dy and using the above formula for magnitude and angle. (10, 10) converts to SQR(200) magnitude and 45 degrees heading which on the Basic Screen is down and to the right from (0,0) the top left of screen. Remember on Basic Screens 0 degrees is due East and the y axis INCREASE going down the screen which is NOT how you learn it in math and physics. In summary a vector is an arrow different from a line segment because it has a direction it is going.Terry is dividing by d the magnitude and skipping the angle calcs so xv and yv can be considered velocities eg, how fast and pos or negative direction on x and y axis on each loop. An arrow going straight up will not change in x axis but will decrease on y axis only, xv = 0 yv = -whatever
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
09-17-2024, 03:30 PM
I did this yesterday, thought better of it and didn't post. Now I think worse of it
![]() Code: (Select All) _Title "bplus overhaul Vector noodling of Terry Ritchie" ' b+ 2nd x 2024-09-18Let us be saved from vectors!
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
09-18-2024, 10:37 PM
That's neat too, bplus. I was playing around with your mod some. You know I've been messing with bouncing and velocity lately, so couldn't resist using it. Here's a swarm. Mouse still controls.
Really surprised so many particles can be handled smoothly. - Dav Code: (Select All)
velocity? man that's acceleration! and way less boring
I forgot, I left the mouse circle white, might want to change that in future mods.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
09-18-2024, 11:12 PM
(09-18-2024, 10:51 PM)bplus Wrote: velocity? man that's acceleration! and way less boring Speaking of change, i believe acceleration is not velocity, it's the rate of chnge in velocity. But I guess in a game they can mean the same thing. Scripetic licence?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.)
![]() Please visit my Website at: http://oldendayskids.blogspot.com/
09-18-2024, 11:13 PM
Wow... another impressive animation! I shouldn't be, but I'm continually amazed at what the BASIC programming language in QB64PE can do. Who needs C/C++ or Fortran?
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| A bigger bouncing ball demo - collision with vector reflection | Dav | 14 | 3,219 |
09-19-2024, 06:54 PM Last Post: sbblank |
|