Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
[Tutorial] Hilbert Plotter by GeoCoder — Gideros Forum

[Tutorial] Hilbert Plotter by GeoCoder

GeoCoderGeoCoder Member
edited May 2014 in Step by step tutorials
I had developed Hilbert Plotter program written in C# some years ago. See wikipedia ref: Hilbert Curve. Thought I'd try to rewrite the program in Lua for Gideros player. It took me about a week to finish the job. Boy, I learned a lot.

Started with a very simple program, drawing a curve of the first order. This was easy. Then, I added a Point class (developed by myself) for larger plots, other than the first order. I got a problem with a larger plot. It smeared the screen. Guessed Lua was too slow for the big pictures. I did not give up. Ain't no quitter. With my brain working hard, I finally found a solution. I merely broke the plot into many small subplots, drawing a subplot a time. The newly developed program worked for all orders up to the 8th! Note: the plot for the 8th order contains 65,536 points!

Next, I added a Slider class (also, developed by myself). That was not easy task. After studying Gideros' Button class closely, I finally finished it. It worked as expected. I used the class to create two sliders: one for changing the order to higher or lower in the range of [1, 8] and the other for changing the plotting speed,from zero to full speed. Boy, it was fun developing and watching my work plotting the curve.

The screen shot:
image

You will find the attached below. The zip file contains everything needed for you to try the plotter. Hope you would like it.

Thank you.

Geo
zip
zip
Hilbert_Plotter.zip
207K

Likes: HubertRonald

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.