Math fun

Everything todo with programming goes HERE.
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8744
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Math fun

Post by Lucifer »

Just for fun, well, not really. For studying trig this semester. :)

For tit-boy to look at too, since the project is still pretty small and relatively easy to grok. No comments though, sorry.

Needs pygame and a pretty new version of python (I'm on 2.4.1, use any non-2.4 python at your own risk). Don't install it, just unzip it and run it in place. There's no code to search system paths right now for its data, it assumes it's being run in place.

Edit: removed attachment, you should download from my website now.
Last edited by Lucifer on Sat Sep 17, 2005 4:46 am, edited 1 time in total.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
TiTnAsS
Match Winner
Posts: 655
Joined: Sun Jan 23, 2005 2:44 am
Location: Reppin the Bay Area!

Post by TiTnAsS »

I will tomorow, im going to sleep shortly here..

So now i'm tit-boy? O_o just so yall know my name is Nick and id prefer to be called Nick to titboy or tna etc.. TNA was a name from years ago b4 i grew up... id change if not for all my friends and everyone knowing me as it..
Damn, it sure has been a while!
User avatar
Lucifer
Project Developer
Posts: 8744
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Ok, now it's on my website and has a few more bells and whistles. :)

http://www.davefancella.com/mambo/content/view/79/70/

So, anyone want to write up a class using pygame that will parse math statements and render them to surfaces? I'm thinking stuff like this:

3 sqrt(2)/2 : And I should get from that a pygame Surface that is as tall as the font used for the rest. It would be nice if it would parse any string looking for math statements and render them inline with the text, but not required. It should be open-ended enough that it should render identically:

3 sqrt(2)/2 3 * sqrt(2)/2 3sqrt(2)/2

I think the shlex module will provide something you might be able to use to parse the statement, maybe a regex will be able to pull it out of a line of text. But pulling it out of a line of text isn't really required, it would just be nice to have. :) (Then I could just put it in the font class and not worry about it)

I'll tackle it eventually, but right now the solution I'm looking at is just drawing the pictures I need and loading them, but that's hardly an ideal solution.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8744
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Ok, I just made a new release that is totally crappy. It's cool, but crappy. (release early release often means: release 3 times a day I guess)

I factored out the one module finally and created a way to load new modules. I've still got some odds and ends to straighten up there, and the second module is so bad that if you have a question longer than about 30 characters, it spills off the edge of the screen. So obviously I need a way to handle that. :)

Anyway, I did add the generic quiz module. I'll probably be making yet another release shortly with that fix, but I don't know. I'm weird that way. I'll make several rapid-fire releases and then not touch it for several months. Heh.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
hyphyleo
Average Program
Posts: 70
Joined: Tue Jan 23, 2007 1:37 am

Post by hyphyleo »

wheres tit boy
roflmycopters
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

The page you requested does not exist. For your convenience, a search was performed using the query "mambo OR content OR view OR 79 OR 70".
There's no place like ::1
User avatar
Lucifer
Project Developer
Posts: 8744
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Check the dates on the posts. This was an old thread.

I have since lost the source for a chunk of mathguy. Really, you're better off just throwing your own game together at this point.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
Post Reply