In my loneliness I geek around with computer programming and try to brush up my math, which you kind of need for some programs. Yesterday I wanted to draw some star shapes without lifting up my pen and to write Python 3 programs that can draw the shapes. It turns out that the program to do this for stars with an odd number of points is really easy, but if there's an even number of points it's more difficult, and if the number of points doesn't divide evenly into 3, 4, 5 or any other small number, it's super difficult. So I wrote my little program to draw stars with odd numbers of points and played around with it a bit, drawing five-pointed stars and nine-pointed stars and 37-pointed stars and whatnot. Then I tried to draw a six-pointed star. Oops. To draw it the right way it turns out I need to know trigonometry, and I'm still at the level of basic geometry right now. But I did write a really crude program (what's called a "procedural program") to draw just a six-pointed star of a specific size, and nothing else. I guess the next step is to turn it into some kind of algorithm by making the code more compact and the use more general, so it can draw an eight-pointed star too--and maybe draw a nine-pointed star because 9 divides evenly into 3 and a triangle has three sides so it's just drawing three triangles.
Thank you for listening. Is anyone else interested in this stuff?
Thank you for listening. Is anyone else interested in this stuff?