Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: yunhua98 on October 08, 2010, 11:19:04 am

Title: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 11:19:04 am
well, so couple days ago, my teacher was talking about the Sierpinski's triangle for lack of anything else to talk about, and since me and a couple friends knew this stuff from a long time ago, we pulled out our calcs to play some games.  my teacher knew we liked calcs but he thought we were going to make a program to view it on-calc.  he said it wasn't possible, ;) so that made me want to make one.  by the time class was out, I had a BASIC (made by my friend) and an Axe version to wave in his face.  :P  but don't get me wrong, I like my math teacher.  ;D

anyway, so here are some screenies plus the programs

Serpnski is Axe
Axeserpnski is the source
and Srpenski is BASIC

it was funny how the Axe one was upside-down and I didn't bother to change that so I could flip my calc and have it shown right side up to him when I stood facing him.  (sorry for the weird wording.  :P)
Title: Re: Sierpinski's Triangle
Post by: Juju on October 08, 2010, 11:27:23 am
Nice. I hope your math teacher was impressed by this xD
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 11:28:50 am
yeah, but I think he was kinda pissed at the same time that he was proven wrong.  ;D
Title: Re: Sierpinski's Triangle
Post by: Broseph Radson on October 08, 2010, 12:04:34 pm
Theres a program to draw the sierpinski's triangle listed in the 84+ manual
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 12:08:11 pm
there is?

wow, I just took the Basic version from my friend and ported it to Axe, but then again he keeps that thing everywhere he goes

btw, I never got a Manual with my calc, just a user guide. ???

EDIT:  why does my post have a scroll bar?
Title: Re: Sierpinski's Triangle
Post by: Broseph Radson on October 08, 2010, 12:14:47 pm
Maybe its the user guide. It has 2 example progs in it and has most of the catalog listed and explained near the end of it.

IDK though. I tried the example program for the triangle and either i did something wrong or it doesnt work. Or its just extremrly slow and inefficient lol

EDIT: Heres a pic of the book: (http://ecx.images-amazon.com/images/I/31UQFI9FaML._SL500_AA300_.jpg)
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 12:19:41 pm
no, the user guide has nothing about programming, only the manual, which I first read online.
Or its just extremrly slow and inefficient lol
thats what Axe is for  :P

EDIT:  yeah, I only have a really thin one that teaches you how to turn the calc on and off and basic graphing  :P
Title: Re: Sierpinski's Triangle
Post by: AngelFish on October 08, 2010, 02:37:48 pm
Maybe its the user guide. It has 2 example progs in it and has most of the catalog listed and explained near the end of it.

IDK though. I tried the example program for the triangle and either i did something wrong or it doesnt work. Or its just extremrly slow and inefficient lol

It's just really inefficient. That was the first program I ever tried and it took me a few tries to realize that I needed to leave the calc for a few hours. Being that slow, it almost put me off of programming.
Title: Re: Sierpinski's Triangle
Post by: Builderboy on October 08, 2010, 02:39:34 pm
Yeah and once its done, it doesnt even look that good.  I made a much faster, much nicer version of my own once i did some research into the Sierpinski triangle ^-^
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 02:55:55 pm
wait, so it doesn't generate dots as it goes?
TI really sucks at coding their own calcs.  :P

I guess my friend didn't get it off his bring-everywhere manual then.  :P
Title: Re: Sierpinski's Triangle
Post by: Builderboy on October 08, 2010, 03:32:11 pm
Nope, mine draws from top to bottom ^^ it is kinda sideways tho :P
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 03:36:22 pm
I'm talking about TI's version  ;)
Title: Re: Sierpinski's Triangle
Post by: Builderboy on October 08, 2010, 03:37:31 pm
Ohh gotcha, but you said "it doesnt generate dots as it goes", but isnt that what TI's does?
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 03:38:59 pm
nah, I was asking whether it did or not, since Broseph Radson said it didn't do anything, I thought maybe it displayed all the dots after an hour.
Title: Re: Sierpinski's Triangle
Post by: AngelFish on October 08, 2010, 03:42:23 pm
Just thinking about it, you could easily generate the same image a hundred times as fast just with the pxl-On() and Line() commands.
Title: Re: Sierpinski's Triangle
Post by: Ikkerens on October 08, 2010, 03:43:41 pm
That image reminds me of TLOZ's triforce.
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 03:47:48 pm
true, or a RclPic or a sprite for Axe, but thats not calc generated, its technically done by you and just shown by the calc.
Title: Re: Sierpinski's Triangle
Post by: meishe91 on October 08, 2010, 05:47:01 pm
Couldn't your Axe program be a lot faster if you only moved the buffer to the screen after all the points are plotted on the buffer? That way you don't get the LCD slowdown issue. But those are cool :) There is also a example on TIBD by Weregoose here (http://tibasicdev.wikidot.com/sierpinski-triangle).
Title: Re: Sierpinski's Triangle
Post by: Deep Toaster on October 08, 2010, 05:52:39 pm
Wow, nice. I don't get how those Sierpinski generators work. At all :(
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 05:53:36 pm
yeah, but I wanted to be almost just like the BASIC one.  :P

damn, Deep Thought keeps ninja'ing people and sometimes by a minute even though I just opened the topic for like a second.  :P
Title: Re: Sierpinski's Triangle
Post by: Deep Toaster on October 08, 2010, 05:55:47 pm
yeah, but I wanted to be almost just like the BASIC one.  :P

damn, Deep Thought keeps ninja'ing people and sometimes by a minute even though I just opened the topic for like a second.  :P

I'm just that fast :D
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 08, 2010, 05:57:22 pm
I remember the example SIerpinski program in my TI-83+ manual (the manual that had like 900 pages). It looked quite cool.

Btw how fast would be the Axe one if you did not update the LCD every pixel?
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 05:59:34 pm
DJ:  did you get the manual with your calc, or did you print it off?
Title: Re: Sierpinski's Triangle
Post by: jnesselr on October 08, 2010, 06:00:23 pm
Okay, So I learned about the Sierpinski triangle in my 82 book. Anyway, it is created one of two ways.  The way used here is called the chaos game.  There is another one called Rule 90.
Title: Re: Sierpinski's Triangle
Post by: Builderboy on October 08, 2010, 06:01:19 pm
I dont think an Axe version could be created, since the basic one uses heavy floating point arithmetic :(
Title: Re: Sierpinski's Triangle
Post by: Deep Toaster on October 08, 2010, 06:01:35 pm
DJ:  did you get the manual with your calc, or did you print it off?

The "Handbook" that came with my calc had the generator as an example program. I'm assuming that's the "User's Guide", because I checked the online manual and it's totally different.
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 08, 2010, 06:03:37 pm
???  I made one in Axe...
you don't technically need the floating point since it really just assigning every pixel a decimal between 0 and 1, just replace the 1s and 0s with 0s and 96s or 0s and 64s and your all set.  ;)

Damn, Deep Thought thats like the 5th time today!  :P
anyway, my "User Guide" isn't near 300 pages.
Title: Re: Sierpinski's Triangle
Post by: Builderboy on October 08, 2010, 06:05:48 pm
Ah gotcha, i guess i just dont fully understand how it works then XD
Title: Re: Sierpinski's Triangle
Post by: AngelFish on October 08, 2010, 08:26:25 pm
Okay, So I learned about the Sierpinski triangle in my 82 book. Anyway, it is created one of two ways.  The way used here is called the chaos game.  There is another one called Rule 90.

Ah, I'd forgotten about cellular automata. I just happen to have an Axe program somewhere in my personal archives that can draw any 1D CA, including rule 90, in under two seconds.

And yes, I know it uses an incredibly inefficient routine. It was my first Axe program.
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 08, 2010, 08:56:13 pm
DJ:  did you get the manual with your calc, or did you print it off?
It came with my 83+. It's pretty much the same as the guidebook PDF on TI website
Title: Re: Sierpinski's Triangle
Post by: NeoCrisis on October 25, 2010, 08:28:35 am
DJ:  did you get the manual with your calc, or did you print it off?

The "Handbook" that came with my calc had the generator as an example program. I'm assuming that's the "User's Guide", because I checked the online manual and it's totally different.

you got samples of programs on your user guide? (well, ok..... the French one doesn't have it.  :o)
I was surprised to see the small amount of information in the user guide, but when I saw the number of pages in the manual, I understood why they didn't print it ;D (the manual would have been bigger than the calculator  ::) :D)
Title: Re: Sierpinski's Triangle
Post by: Michael.3545 on October 25, 2010, 09:48:11 am
Now you should show your teacher Quigibo's smokin fast fractal program.  Take a picture of his expression for me!
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 25, 2010, 04:27:15 pm
DJ:  did you get the manual with your calc, or did you print it off?

The "Handbook" that came with my calc had the generator as an example program. I'm assuming that's the "User's Guide", because I checked the online manual and it's totally different.

you got samples of programs on your user guide? (well, ok..... the French one doesn't have it.  :o)
I was surprised to see the small amount of information in the user guide, but when I saw the number of pages in the manual, I understood why they didn't print it ;D (the manual would have been bigger than the calculator  ::) :D)
(http://xlib.mtv-music-generator.com/timanuals002.jpg)
That's how large the 83+ manual was when I got it in 2001. This is a 1999 manual revision. It still says OS 1.00, which never got released, I believe. Some pages show screenshots with 25+ KB of user RAM. I also have a french TI-83+ manual that is as big somewhere, but I lost it.
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 25, 2010, 04:37:59 pm
/me faints

I want those!  :D
Title: Re: Sierpinski's Triangle
Post by: Deep Toaster on October 25, 2010, 04:44:59 pm
DJ:  did you get the manual with your calc, or did you print it off?

The "Handbook" that came with my calc had the generator as an example program. I'm assuming that's the "User's Guide", because I checked the online manual and it's totally different.

you got samples of programs on your user guide? (well, ok..... the French one doesn't have it.  :o)
I was surprised to see the small amount of information in the user guide, but when I saw the number of pages in the manual, I understood why they didn't print it ;D (the manual would have been bigger than the calculator  ::) :D)

There were just two example programs: Sierpinski (which they didn't bother explaining, of course), and a Guess My Coefficients game :P
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 25, 2010, 05:47:17 pm
/me faints

I want those!  :D
It can be downloaded at http://education.ti.com/downloads/guidebooks/graphing/83p/83m$book-eng.pdf

It's designed slightly differently now but it still has everything intact.
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 25, 2010, 05:48:23 pm
yeah, but those hardcopies look awesome!

btw, the links broken.  ;)
Title: Re: Sierpinski's Triangle
Post by: FinaleTI on October 25, 2010, 05:50:58 pm
DJ:  did you get the manual with your calc, or did you print it off?

The "Handbook" that came with my calc had the generator as an example program. I'm assuming that's the "User's Guide", because I checked the online manual and it's totally different.

you got samples of programs on your user guide? (well, ok..... the French one doesn't have it.  :o)
I was surprised to see the small amount of information in the user guide, but when I saw the number of pages in the manual, I understood why they didn't print it ;D (the manual would have been bigger than the calculator  ::) :D)
(http://xlib.mtv-music-generator.com/timanuals002.jpg)
That's how large the 83+ manual was when I got it in 2001. This is a 1999 manual revision. It still says OS 1.00, which never got released, I believe. Some pages show screenshots with 25+ KB of user RAM. I also have a french TI-83+ manual that is as big somewhere, but I lost it.
My TI-83+ manual isn't quite that big, but mine isn't the newest one and I got those two programming examples in it. I'm glad I don't have the newer one, cuz it's really lacking in programming info.
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 25, 2010, 05:51:12 pm
yeah, but those hardcopies look awesome!

btw, the links broken.  ;)
Yeah SMF doesn't handle  the $ char in links. You need to copy and paste it in your address bar.
Title: Re: Sierpinski's Triangle
Post by: yunhua98 on October 25, 2010, 05:56:11 pm
oops, didn't notice.  :-[
Title: Re: Sierpinski's Triangle
Post by: DJ Omnimaga on October 25, 2010, 08:53:40 pm
No problem, I did not see it at first when I clicked reply. :)