Omnimaga

Calculator Community => Casio Calculators => Casio PRIZM => Topic started by: ProgrammerNerd on August 22, 2014, 02:43:24 pm

Title: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on August 22, 2014, 02:43:24 pm
The Mandelbrot fractal is quite a sight.
Such wonder and amazement that can be found while viewing the Mandelbrot fractal can now be had on the Casio Prizm graphing calculator.
In addition this program can also be compiled for the PC assuming SDL is installed.
Just run make and it will be up and running.
There is very little difference in function between the PC version and the casio prizm version, the resolution is higher but that is it.

The controls are
Left, right, up, down moves the window in that direction
Menu key or ESC on the PC, exits to the menu or exits the program (PC)
F1 sets maximum iterations to 65535
F2 sets the maximum iterations to 224 (this is the default upon starting the program)
F3 toggles deep mode which is on by default. This means you can zoom in deeper with a slight performance hit.
I do not notice the difference
1 subtracts one from the maximum iterations
2 adds one to the maximum iterations
3 subtracts ten from the maximum iterations
4 adds ten to the maximum iterations
5 subtracts 100 from the maximum iterations
6 adds 100 to the maximum iterations
Shift zooms in
Alpha (ALT on PC) zooms out
Source code https://github.com/ComputerNerd/Mandelbrot-Casio-Prizm-Explorer
Binary https://github.com/ComputerNerd/Mandelbrot-Casio-Prizm-Explorer/blob/master/mandelbrot.g3a
Screen shots (from the PC version which gets very similar output differing only in resolution).
(http://i.imgur.com/CWM8Ekp.png)
(http://i.imgur.com/0pNWIZX.png)
Anyways if you have any bug report(s), feature request(s), pull request(s), patch(es) or whatever relates to this I would be happy to hear about them.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on August 22, 2014, 03:14:18 pm
Those look pretty impressive! I can't wait to try this on my calc to see how fast it renders :)
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on August 22, 2014, 05:30:01 pm
Well yes you did point out that an old version of mine is fast http://www.omnimaga.org/casio-prizm/(prizm-c)-mandelbrot-set/15/
However this should be even faster. Also if you are wondering it did not take me that long (since the time of the my previous post) to come up with a new version, I just forgot about the project and decided to improve it today thus bringing a better explorer.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on August 23, 2014, 09:56:37 am
Ah right I forgot about that one. Prizm dev on Omni is rare so a lot of the stuff that happened was a while ago plus I don't always use my prizm often. :P
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on August 23, 2014, 04:06:22 pm
Yes I know prizm dev in general rare not just here it seems. I find it easy to program for so I am not sure why that is the case.
Anyways if you get a chance tell me how well this program works for you.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on September 26, 2014, 12:28:13 am
I think it's because the majority of people who use advanced Casio calcs are in France, but in France, the PRIZM is considered as too expensive, so most people go for a 9860GII series model. Another issue is that most calculator programmers prefer BASIC because they find ASM/C too hard or different (or prefer languages that can be coded directly on the calc between classes or when commuting) and sadly, PRIZM BASIC is incredibly slow to draw stuff compared to 9860Gii BASIC (although home/math screen text is fast enough). A port of Axe that can be coded on-calc might help, since it revived TI-84+ programming in 2010, but it is not guaranted. Axe 84+ helped bridging the gap between BASIC and ASM/C (and even helped some BASIC programmers transition towards ASM).
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on September 30, 2014, 05:20:22 pm
Really I could never understand why people like BASIC so much. Yes it is nice for quickly getting something done when you don't have a PC with you but I would not use it for anything serious such as a game. Yes Prizm BASIC is too slow.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on September 30, 2014, 11:21:48 pm
Some people use it simply because even after getting help and learning ASM/C thoroughly, they just don't get it. They usually don't use it because they like it, but rather because they like programming for calcs. It's made much worse with the PRIZM by the fact it's impossible to test an ASM/C program using an emulator (unless you're very lucky but even then it will not run at accurate speed), so when debugging, the user has to send his program to his calc over and over.

If ASM/C were much easier to get used to (especially ASM) when it comes to calculators, then there would be far more PRIZM ASM/C coders than there is now, same for Z80 ASM coders. Look at Axe Parser: Omnimaga used to be almost entirely BASIC programming. The second Axe 0.0.5 came out, it almost completely replaced BASIC as TI-83+ language of choice. It's because Axe syntax for simpler stuff looks almost identical to TI-BASIC, but the language has most stuff that ASM can do, including speed. There are even former BASIC programmers who switched to Axe then learned ASM, but despite knowing ASM well enough to make games, they switched back to Axe because they don't feel comfortable using lower-level languages.


Source: 13 years of experience in the TI/Casio community and three failed attempts at learning Z80 ASM.
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on October 02, 2014, 06:46:27 pm
If they don't get it they are doing something wrong. Also the emulator is not all that bad.
Title: Re: Casio prizm Mandelbrot explorer
Post by: Ivoah on October 02, 2014, 07:12:06 pm
This program won't compile on mac, I got this error:
Code: [Select]
[email protected] ~/Desktop/Mandelbrot-Casio-Prizm-Explorer $ make
cc -Wall -Wextra -Isrc -O3 -flto -DPC -fmerge-all-constants -fsingle-precision-constant -s -Wl,--gc-sections -pipe -c src/main.c -o src/main.o
clang: error: unknown argument: '-fsingle-precision-constant'
clang: warning: -Wl,--gc-sections: 'linker' input unused
make: *** [src/main.o] Error 1
[email protected] ~/Desktop/Mandelbrot-Casio-Prizm-Explorer $
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 02, 2014, 11:24:16 pm
If they don't get it they are doing something wrong. Also the emulator is not all that bad.

Quote from: http://www.omnimaga.org/index.php?page=Rules
The following are disallowed on the Omnimaga forums in any topic at any time.
Flaming, flooding, intolerance, and provocative comments.
I'm not gonna argue further because I saw your true colors now. There are sites on which you can lash at users of specific programming languages, people who are different and be narrow-minded. Omnimaga is not one and it will remain open to users of any programming language and free of reprimands for using said languages.

As for the emulator, there were reports about some programs running much slower in it than on the real calc and vice-versa. Hence why WabbitEmu or jsTIfied for the PRIZM was often suggested.
Title: Re: Casio prizm Mandelbrot explorer
Post by: TIfanx1999 on October 03, 2014, 04:32:22 pm
If they don't get it they are doing something wrong. Also the emulator is not all that bad.

Please keep in mind that not everyone has the same capabilities when it comes to programming or learning things. While ASM or C might be easy for you, someone else may have a hard time with it or not be able to grasp it at all.
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on October 04, 2014, 12:31:33 am
Wow I did not expect that reaction. I apologize. That post was not meant to be ad hominem and I should have presented it in a more respectable manner and backed it up with a well constructed argument. First of all I when I replied to the post I did not notice that you (DJ Omnimaga) have mentioned your personal experience. That is not why I said that. The reason why I said that was because I do not doubt anyone's theoretical ability to learn even assembly. You have ran a nice website and been a part of the community for a long time further enhancing my belief in your capability. I think the issue is that people may be mislead by others into doing something wrong. I do believe that if anyone puts their mind to it they can do it and how they do it does affect the success of if they get it done. I do not think one who has trouble grasping a certain programming language is in any way inferior to those that do and understand that some people will not get it using one stagey and will have to pick another. I remember when I first started learning C it was a very long time ago so details are faded but I do recall for some concepts having to read multiple articles until I understood it. There is nothing wrong with not being able to grasp a concept. The doing it wrong part is thinking that, that one article you read is the best explanation in existence and just banging your head against the article trying to learn solely from it. Also I do admit some narrow mindness. When I wrote that post I thought that people have a similar philosophy on handling "your doing it wrong" as I do. If someone told me that I was doing something wrong I would like to learn more about why they feel that way. I would then analyze their viewpoint and consider if I should act based on what I learned. For example when I started programming I had an insistence to use the smallest variable type possible despite programming for a 32-bit CPU (only use smallest for 8 bit CPU) when it is actually bad. For example using unsigned char for a loop. Instead I should just use unsigned. I then read about this and upon discovering that I was wrong I did some tests and found out that yes I was doing it wrong and if someone would have told me that I would have tested their claim and see if they are correct and if so I would have acted upon it. Also another example, one would say that I struggled with Spanish and say that English is the only language I speak. You know why because I was doing it wrong and I knew it but did nothing. Instead even now I just write stuff about how I sucked at Spanish but what I should do is take action. Instead of just starting at a list of words I should have memorized roots and prefixes and suffixes.  If someone disagrees with the way I perceived to be better than my terrible habits and they tell me that I am still doing it wrong. I would not get angry at them. I would learn from them. What you should get out of this post is that the reason I said what I said was because I believe in you and your ability and I do not in any way think poorly of you. Also about being told that they are wrong has another advantage the person who told the other one they are wrong may learn something too. For example lets say that someone told me I should create duplicate code comments. For example they tell me that I should do
Code: [Select]
unsigned i=123;//set i to 123
I tell them why doing such is bad as it is nothing more than duplicated code and then they hear my argument and then they learn something and break a habit which they evidently feel strongly about as they were willing to correct other people and by telling the corrector why they are wrong you are doing a good service to the people by removing some confusion and deception from the world. I am very glad that people here took a stance that my post was unacceptable and in doing I was able to have the opportune to correct my mistake instead of just leaving people offended. Speaking of which I do hope this post made things only better and in no way worse

Also Ivoah the CFLAGS that are causing you errors are specific to gcc you can remove them and the program will still run.
Title: Re: Casio prizm Mandelbrot explorer
Post by: TIfanx1999 on October 04, 2014, 01:38:15 am
Thank you for clarifying what you meant. Beautiful post. :) There did use to exist some elitism based on language preference (on both sides). That's one of the reasons Omnimaga exists today; to have a place that is free of discrimination and hostility. The calc hobbyist community doesn't really have that problem these days, at least for the most part. I am very glad that you don't feel that way either.
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on October 04, 2014, 09:37:22 am
I am glad this ended well and I am glad that people told me that I was wrong for that post instead of just walking away felling offended.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 05, 2014, 02:44:57 am
Thanks for clarifying your post and sorry if I sounded rude. It's just that in the past, what Art_of_camelot mentionned in his 2nd post was rampant in the TI community from 1999 to 2003, so much that almost anything BASIC-related would turn into a flame fest instigated by a select few ASM elitists. This has been much less common in recent years (the most recent case was from an user that appears to be banned from both Cemetech and Omnimaga since months ago, but it was directed towards Axe Parser, not TI-BASIC), but it still occasionally happens and Omni always tried to keep it away from its forums (in fact it was like the very reason why Omni was created). The issue, however, was not always people being offensive, but rather totally uncaring about the fact not everyone has the same learning skills for everything, which, back then, seemed pretty typical from hardcore programmers. And I personally am very vocal about it.

Regarding TI-83+ ASM, the issue that made it hard for people to learn it is because the best tutorial available is not written with visual people in mind so if you only work with real life program examples (eg a mini game) then you were screwed, and alternatives were often incomplete or even less clear to visual people. Hot Dog's tutorial and Axe helped, although some people still have serious trouble getting the grasp of anything low level.

In my case, though, I think it's more a case of minimal asperger symptoms that kicked in and rendered futile the 3 failed attempts at learning ASM, the one at learning web dev through a multimedia major (which I ultimately dropped out from) and the one at figuring out some supposedly very easy Axe Parser material. I have the same problem when learning to use different music creation softwares and getting used to real life habit changes.

Anyway no hard feelings held, just a misunderstood and I'm glad you are more open-minded than I initially thought.
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on October 05, 2014, 10:59:55 am
Yes now I see where the Omni part of the forum name came from. As for my questioning of what is so good about Basic it was more of me just trying to understand why people use it and I am glad you took the time to explain why. As for me saying that I would not use it for anything serious I was referring specifically to Casio BASIC which as you mentioned is too slow. I am still considering implementing an Axe JIT or interpreter for the Casio prizm. I would not flame someone for writing in a different language. Recently I am taking an interest in python. I understand that I will not get the same performance as I would get in C but it seems nice for getting things done quickly. I do think that different languages have different purposes but if it works for your purposes then there is nothing wrong with using it.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 05, 2014, 12:06:00 pm
Actually the name is a different story, since Omni was started 2.5 years before its website opened and before I discovered the existence of an online calculator community. :P I was very into Final Fantasy VII and the Omnislash skill and the word magic inspired the name. I guess it kinda fits, though :P

On the topic of Casio Basic, I am curious how many years it would take to draw a Mandelbrot? :P That said, I saw cool Basic games before, although many are cg20-only, not cg10.

Title: Re: Casio prizm Mandelbrot explorer
Post by: chickendude on October 22, 2014, 05:50:34 am
I just got my Prizm back after over a year and this is the first thing i put on there! It looks great, i especially like watching how the pattern changes from one iteration to another. Thanks for sharing it! Also, thanks for sharing the source. I really should get around to learning C one of these days, though personally i find ASM simpler :P

I also agree that in general when people say they are unable to learn something it's not usually a matter of ability. People who learn the quickest just know the best shortcuts and easiest methods ;)
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 23, 2014, 02:25:02 am
Why did you lose your Prizm for a year? Did you lend it to somebody for school or did you lose it somewhere? ANyway glad you got it back. It would be nice to see you do some PRIZM stuff in the future (maybe port some of your older 83+ games?) :)
Title: Re: Casio prizm Mandelbrot explorer
Post by: chickendude on October 25, 2014, 09:13:02 pm
It got left at the school i was going to in China since i couldn't get a visa to go back and just today one of my friends mailed it back to me, so i got my Prizm and NSpires back :)
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 26, 2014, 11:35:51 pm
Ah I see now. I forgot about that China trip >.<. At least you got them back that's what counts.
Title: Re: Casio prizm Mandelbrot explorer
Post by: ProgrammerNerd on October 27, 2014, 11:42:29 pm
chickendude Glad to hear that you enjoyed using my program and got your calculators back. When a calculator that I own leaves my sight when it should not, I get paranoid, someone else having it for a year would be terrible but you got it back and at least you knew them.
Title: Re: Casio prizm Mandelbrot explorer
Post by: DJ Omnimaga on October 31, 2014, 12:22:35 am
Yeah I used to do that a lot when I programmed them a lot. I don't do so as much anymore since the last 5 years since I mostly use Z80 calcs and got like three compatible models handy, but I would still get scared if I was working on a program then lost the calc on which it's on and had forgotten to back it up. >.<