Jan 24, 2024 Replies: 1 B4J Project attached. No other libs other than the default B4J libs required (can probably be easily converted to B4A and B4I as it only draws on a standard B4J canvas) The code is simple and the principle used to do this is also simple - but it creates complex and beautiful patterns. Run the project, sit back, and enjoy the beauty of Modular Multiplication on a Circle for a number of minutes (put on some nice classical music in the background and relax while watching the patterns being drawn). Some amazing patterns (about 99 of them) being drawn in real time - the only change from one pattern to the next is an increase of the multiplier by +1. Change the code to your liking. Attachments b4jMathModularCircle.zip b4jMathModularCircle.zip 2.3 KB · Views: 503 Last edited: Jan 25, 2024 Click to expand...
B4J Project attached. No other libs other than the default B4J libs required (can probably be easily converted to B4A and B4I as it only draws on a standard B4J canvas) The code is simple and the principle used to do this is also simple - but it creates complex and beautiful patterns. Run the project, sit back, and enjoy the beauty of Modular Multiplication on a Circle for a number of minutes (put on some nice classical music in the background and relax while watching the patterns being drawn). Some amazing patterns (about 99 of them) being drawn in real time - the only change from one pattern to the next is an increase of the multiplier by +1. Change the code to your liking.
Johan Schoeman Expert Licensed User Longtime User Jan 27, 2024 #2 Try this one - add your own function to the code: B4X: Copy public Sub mathf(x As Float) As Float Return x * c 'Return x + (x Mod 3) * 49.9 + 49.9 + c ' was x * c multiplication function 'Return (x Mod c) 'Return x + 40 + c 'Return x + c + divisions/2 'Return Sin(x * c) * 100 'Return Power(x, 2) + c End Sub No other libs required other than the default B4J libs. Real time animation.... Attachments b4jMathModularCircleNew.zip b4jMathModularCircleNew.zip 2.3 KB · Views: 399
Try this one - add your own function to the code: B4X: Copy public Sub mathf(x As Float) As Float Return x * c 'Return x + (x Mod 3) * 49.9 + 49.9 + c ' was x * c multiplication function 'Return (x Mod c) 'Return x + 40 + c 'Return x + c + divisions/2 'Return Sin(x * c) * 100 'Return Power(x, 2) + c End Sub No other libs required other than the default B4J libs. Real time animation....