![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyakQtdBmtzOg5K4uQPH4KN1NfCeb6kjGJE7-YW13jH3iscl2SnRQEwBnPZkflEQCEzHIHkk3EYr-v2CKXu8SQR9fSHd1zmenC5uMvj23GoG9jeyoyEn3pCbSa4r3jXKym2RCBP3Wtif1I/s400/sin-01.jpg)
Calculation: if(Math.round(Math.sin(n))%6==0){//paint it!}
As it turns out, it doesn't need to be 6 to generate this pattern because we round the SIN calculation first. So, if(Math.round(Math.sin(pInt)*Math.PI)%3==0){...}
generates this:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWng_VCME-2ot7rA2VtrM1VNtmvd_BiDoznkcyNKVk4bFJW7pVmhPpbVret2FW8oPtZQrFtt-z_dv_PycMFCGz_eG3Wd3DXUoxAqzdVrJbg0biStzfPGCDCYspN7pBpPwxB_Be0nuOm1O4/s320/sin-02.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGkxSvZvI_CxZ0DaEFqHJbWbw5_9VBAZ_B8LwMxKLx1l8GoHFv3Do7rnFy3Lqu77J_sjqIWulyo1jKarXVwPDPhaqr_zl7dlaBjlkCYdMefURuSi9vsDSzkpQiH89479XpeJJe2zogukS7/s400/sin-02-hi.jpg)
And then there's this...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPa34_N2lXF9kT5RBNQdbFmAq4Ha-Mw1RgV-jBUbvGKoY9vydLBphY6BE9M2r8BwRUSh57t8-16m1Q6FP0vRsZrzAFyheZ9JueFFhTJqF3UIFwpibD8jiqLLU80RYz88VkLFWMqF2aFd6g/s400/sqrt-PI-01.jpg)
if(Math.round(Math.sqrt(pInt)*3.14159265)%2==0){//draw Tempest!}
Same formula as above but showing only the prime numbers.
And again with the primes blurred to enhance the pattern they create.
Same stuff, modding 3 this time:
Let's take the average of PI and the Golden Ratio and mod that by 2...Holy guacamole!
So if you were looking for a visual representation of what the relationship amongst primes and PI and PHI might look like, look no further.
Calculation per dot: (Math.round(Math.sqrt(Math.pow(pInt,2))*(1.6180339887*3.14159265)/2)%5==0)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi24wOZTtWyRBjmgQp7lkfGPHEJvguBYo6jdIr_9306tlhMad6XXvm7QlujPFpB_zbIWHOT9B3xJJtZ3QYMua6YDg1fm9ygGqT9cuZvP_MpNTB_GG1pGFCapLwHzQGEEJannP09jU-esJEx/s400/pi-phi-primes.jpg)
No comments:
Post a Comment