Discussion:
Terry Blunts CoOrdinate Collision Program
(too old to reply)
Richard Ashbery
2019-07-30 17:14:51 UTC
Permalink
I've cast my eye over Terry Blunt's excellent CoOrdinate program after
making it run on a Raspberry Pi/Full HD monitor. I can't figure out
what's causing objects to stick together (2 or 3 pairs sometimes with
gap) and sometimes a wobble (run CoOrdinate_FHD for some seconds to
see). When a moving object collides it then becomes part of the new
pair. A similar thing happens when the object is static.

The original program (MODE 9) had only 4 filled circles but I've
increased these to 30 - it still exhibits same problem. Any programmer
who would like to take a peek/fix then download from...

http://www.riscosbasic.uk/problems/Terry_Blunt.zip

Information is located in a PDF book...

http://www.riscos.com/support/developers/agrm

and CoOrdinate collisions are covered in section 5.4

Richard
News
2019-07-31 13:38:58 UTC
Permalink
Post by Richard Ashbery
When a moving object collides it then becomes part of the new
pair. A similar thing happens when the object is static.
I think you need to change a line in PROCupdate.

Original:
IF a%*a% + b%*b% < c%*c% PROCbounce

Change to:
IF a%*a% + b%*b% <= c%*c% PROCbounce
--
Chris Johnson
News
2019-07-31 14:22:48 UTC
Permalink
Post by News
I think you need to change a line in PROCupdate.
No - that doesn't solve the problem.
--
Chris Johnson
Richard Ashbery
2019-07-31 17:56:12 UTC
Permalink
Post by News
Post by Richard Ashbery
When a moving object collides it then becomes part of the new
pair. A similar thing happens when the object is static.
I think you need to change a line in PROCupdate.
Original: IF a%*a% + b%*b% < c%*c% PROCbounce
Change to: IF a%*a% + b%*b% <= c%*c% PROCbounce
No sadly it doesn't - thanks for trying. Let me know if you have any
other ideas.

Would make a great screen saver.

Richard

Loading...