⚗ When CIRCLE feels to slow, try and test some triangle math

Started by CharlieJV, Sep 14, 2023, 01:48 AM

Previous topic - Next topic

CharlieJV

This article is about an experimental/test BAM program, but might be useful for any implementation of BASIC.  Or other programming languages.

https://basicanywheremachine-news.blogspot.com/2023/09/when-circle-feels-to-slow-try-and-test.html

Lucidapogee

Here's an idea. Not sure if it's good or makes sense. Take all of your speed drawing routines in BASIC, include them in a library of sorts, and have it load automatically. This way you might be able to make "new commands" without touching the js or requiring the user to include the code manually. The library could just be a file with basic functions.

Your blog looks nice btw.


CharlieJV

Quote from: Lucidapogee on Sep 14, 2023, 11:21 PMHere's an idea. Not sure if it's good or makes sense. Take all of your speed drawing routines in BASIC, include them in a library of sorts, and have it load automatically. This way you might be able to make "new commands" without touching the js or requiring the user to include the code manually. The library could just be a file with basic functions.

Your blog looks nice btw.

That's a generally good idea, and something I've been doing for things I only want to do in BASIC with the usual syntax for functions and subroutines in BASIC.

But the syntax for CIRCLE is pretty special, and I don't want to lose that for compatibility with most BASIC implementations.

When the benefit far exceeds the pain of staring into javascript's eyeballs, I don't mind too much.

And the subroutine I came up with is so short and simple, I really don't mind.

On the plus side, details in the link posted just before this reply, my routine beats by a hair two routines well-known for their speed handling circle drawing.  I'd be unhappy implementing those routines in javascript.