![]() |
Forum Index : Microcontroller and PC projects : Maximite polygon patterns
![]() ![]() |
|||||
Author | Message | ||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Sadly I don't think so. The circle command can't and I don't see how my code could but it will now nag to my death. Which is what makes it worth while. Peter |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Have a play with Jim's program on page 2 of this post. Change st to 1 and it will draw a polygon. Increase s to make something more like a circle (more points). change sX to make an ellipse. remove the pauses for more instant gratification. Maybe changing the formula to fill allPoints() can do what you want but its a long long time since I did trig. Bill PS I thought that changing z might do it but no. Keep safe. Live long and prosper. |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
Just to go full circle, you probably need matherp with his ability to work in this area It should be possible to do it dot by dot but that may lead to insanity. Put your feet up and have a think. Peter |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
The Formula of a ROTATED Ellipse is: ((X−Cx)cos(θ)+(Y−Cy)sin(θ))2(Rx)2+((X−Cx)sin(θ)−(Y−Cy)cos(θ))2(Ry)2=1 I thought this might help ![]() Peter |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
This link might help too. Bill Keep safe. Live long and prosper. |
||||
maxidavid Newbie ![]() Joined: 07/03/2019 Location: AustraliaPosts: 23 |
OK, Thanks Super Expander had the circle command with start and end points and angle after the last comma. You could draw some interesting patterns with the FOR and NEXT commands, changing the draw angle. I hear some work is being done for MMBasic on the MaxiMite and wondered if this would be considered. Thanks |
||||
maxidavid Newbie ![]() Joined: 07/03/2019 Location: AustraliaPosts: 23 |
Hi, Sorry, I dont understand: ((X−Cx)cos(θ)+(Y−Cy)sin(θ))2(Rx)2+((X−Cx)sin(θ)−(Y−Cy)cos(θ))2(Ry)2=1 If I want an ellipse rotated 45 degrees it would read. Circle 1,160,100,65,10,,,45 using Super Expander. I just think this can be done for MaxiMite since it has the circle, pixel, line, commands. etc. Sorry if I'm being annoying. I just want an easy way without complex maths. example: FOR A = 0 TO 360 STEP 10 CIRCLE 1,160,100,65,10,,,A NEXT A This would draw an ellipse pattern. Any thoughts ? Thanks |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
You are asking that the complex maths is built into the Maximite. The problem is that although circles and ellipses symmetrical about x,y can be drawn without using trigonometry, tilted ellipses can't. There is no way I can find of plotting them without effectively rotating a symmetrical ellipse using a normal cosine and sine transformation. This is slow and clunky and would probably have very limited use so I suspect there will be little appetite to include it in Maximite or Micromite firmware. |
||||
maxidavid Newbie ![]() Joined: 07/03/2019 Location: AustraliaPosts: 23 |
Hi again, The MaxiMite is 100's of times faster than a C64 using the Super Expander. It has 4x the available memory. The rom for super expander is only 8k. I dont understand why the equivalent cant be added to the MaxiMite firmware. What we need is someone to write a small program adding these functions, the program would be 8k or less. I cant do it :( Cheers. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Maybe you can't but maybe you could find out how it was done on the C64 - algorithm etc - and then someone else can figure if that can be adapted. Just asking for "more" (Oliver-style) is not actually any help. In other words, the answer to your "why the equivalent cant be added to the MaxiMite firmware" may be that it could be if you put in the work to find out how it was done on the C64. I'm guessing no-one else feels inclined to put in the effort to do that. John |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
David, Here is a maximite version of Peter Mather's program to draw random ellipses. No fill though. This will draw one ellipse at a random angle and aspect ratio - you can set the angle and aspect ratio in the program. I haven't taken the time to understand what's happening in there - it just works. Bill Keep safe. Live long and prosper. |
||||
maxidavid Newbie ![]() Joined: 07/03/2019 Location: AustraliaPosts: 23 |
Hi, I had a play with Peters program: |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |