Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Matrefeytontias on November 14, 2013, 01:34:43 pm

Title: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 14, 2013, 01:34:43 pm
Hey guys,

Seeing the challenge TheMachine02 shamelessly sent me (http://ourl.ca/17189/367199) (:P), I wanted to try and do some 3D, but this time without defining any vertex by advance. So this came out.

What it features :
So yeah, it's not really useful, but I found that it would be cool to try and do such program.

Small precision : the graphed function doesn't give exact results. I mean, there's no such thing as units. The only point of that is making good-looking results on-screen, it's not a mathematics tool.

How to use it : by default, prgmDOTSURF (Noshell executable) will graph the 2x² function. You can move around the graphed function with the arrows, zoom in with + and out with -, rotate left with [Y=] and rotate right with [graph], switch between dots and grid view with [mode] and exit with [clear].

You can also define your own function for the program to graph. To do that, just edit prgmFUNC3D. While I'm speaking about a "function", this is actually Axe code that you'll have to compile. I want to make this into a more user-friendly way, but I still have to figure how. Here're instructions on how you can define your function :
Remember that grid mode will lag a lot at 6MHz, since the program has to draw a line between each of the 117 dots.

So, I think that's all. For those who don't know Axe but want to try anyway, I give you some functions that you can copy in prgmFUNC3D (that will also be an example for those who want to write their own :) ) :

The default 2x² :
r2*r2*2?r6

One of my favourite functions (also, one that demonstrates well the clipped line routine), the good old x3 :
r2*r2*r2?r6

Some animated sinusoidal function :
Sin(r2*16+O)//4?r6

More animated sinusoidal function to demonstrate the use of both X and Z coordinates to generate Y :
Sin(r2*16+O)+Cos(r3*16+O)//4?r6

Here's a little screenshot that describes the process of drawing 2x² and navigating around the graphed function (at 6MHz of course) :

(http://img.ourl.ca//dotsurf2xsquared.gif)

Don't be horrified by the how-so non-user-friendly interface, I'm working on it :P

prgmFUNC3D is the program you have to edit to write your own function, prgmSINE3D is the source to compile, and prgmDOTSURF is the executable (here, it contains the 2x² default function).

Feel free to make functions, share them with others if you want, and don't hesitate to ask if you have questions :)
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: TheMachine02 on November 14, 2013, 01:46:17 pm
Just    too    cool   :crazy:
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Eiyeron on November 14, 2013, 02:30:53 pm
Idea: Try to collect data from TI variables (like lists or matrices), and parse them for a better experience. I would see a Basic routine that would make the data and the Axe one to show them!
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 14, 2013, 02:38:58 pm
Eiyeron not possible, because you can put everything Axe knows in prgmFUNC3D, since it's a part of the program. There is no data.

What I planned is a custom input routine that will parse the entry while the user is entering it. I think it's the most user-friendly way to do it.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Eiyeron on November 14, 2013, 02:40:28 pm
Yes, but IF you manage to parse the data in a variable, you could avoid stocking pretederminated functions/results and rcompiling for each function!
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 14, 2013, 02:49:59 pm
Why are you talking about data ? There is not a single byte of data.

I think you didn't understand. I'm planning to write an input+interpret routine so that the user can input a function to graph by pressing a button when running prgmDOTSURF. prgmFUNC3D will be facultative.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Eiyeron on November 14, 2013, 03:05:20 pm
^That was I thought.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Sorunome on November 14, 2013, 04:09:28 pm
wha, that is looking awesome O.O
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: DJ Omnimaga on November 14, 2013, 10:32:50 pm
Very good job Matrefeytontias. :) If you switch to 15 MHz projects one day, will Super Mario 64 be next? :trollface:
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Hayleia on November 16, 2013, 01:59:04 am
If you switch to 15 MHz projects one day, will Super Mario 64 be next? :trollface:
I don't think he will ever switch to 15 MHz. Even if he got a 84+, all his classmates would still have 6 MHz calcs. And most of them don't even have 83+ calcs but 82 Stats.fr. This is why he ported JetPack 8x to the 82 Stats.fr I guess.

Anyway, that looks great indeed, nice work.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: DJ Omnimaga on November 16, 2013, 02:02:47 am
Yeah true lol. I wonder if in a few years his classes will ever switch to newer models, especially now that the 82 Stats.Fr got discontinued? The 83 Plus.Fr that is now sold in stores has 84+ hardware. Or does he live in a very poor area of France? Over here, when I went to hi school until 2003, many people still had TI-80s or the old rectangular TI-82's.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 16, 2013, 02:37:11 am
If you switch to 15 MHz projects one day, will Super Mario 64 be next? :trollface:
I don't think he will ever switch to 15 MHz. Even if he got a 84+, all his classmates would still have 6 MHz calcs. And most of them don't even have 83+ calcs but 82 Stats.fr. This is why he ported JetPack 8x to the 82 Stats.fr I guess.

The part about Jetpack and not switching to 15MHz is true, but it has nothing to do with my classmates. It's just that I think that using Full is a lazy alternative to optimizing, so instead I optimize (see IkarugaX).

DJ_O I don't think TI-82 stats.fr are discontinued ...
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 16, 2013, 07:04:39 am
Bump :

Who said it was hard to write an equation parser ? :P

This is 6MHz :

(http://img.ourl.ca//dotSurfInput1six.gif)

And this is 15MHz :

(http://img.ourl.ca//dotSurfInput1fifteen.gif)

I don't release anything for now because I want to get number parsing working first.
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Sorunome on November 16, 2013, 07:06:40 am
looking awesome, reminds me of Graph3D :)
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 16, 2013, 07:08:28 am
Well, it does the same thing but less good :P
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Sorunome on November 16, 2013, 07:12:24 am
Well, it does the same thing but less good :P
Then make it better :P
Title: Re: [Axe] Dynamic 3D functions explorer thingy
Post by: Matrefeytontias on November 16, 2013, 07:13:57 am
That's why I keep working on it ;D

But as I said on Cemetech, I don't want it to be an actual 3D grapher. It's not and will never be a mathematics tool, due to Axe's speed. I will remain an eye-candy program.