Mandelbrot set

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mandelbrot set

Lozminda
This post was updated on .
Following on from this link a bit..

http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Experienced-People-Please-share-your-struggles-tt4034156.html

I present my first Mandelbrot Set drawn on the VMEmulator



This is the set:  x -1.2 to +0.4,   y -0.8 to +0.8

It took about 18 hrs to draw (started at 1pm, finished 6am the following morning). If you look closely it isn't quite finished, I forgot that I'd put it in a loop, so 5 mins later the screen was clear and it was starting again. Fortunately I know myself well and took a few screen shots now and again in case of future muppetry.

Am going to see if I can get a third colour in (i.e. grey) and also I've some minor efficiencies to do. Also my iterative limit is only ten, hence the reason for the blurriness. Also you'll notice that it's coloured the wrong way round (traditionally the set is black) but with the background being white, it was easier to see if my program was working having out of the set being black and in being white.

Here's a couple of screen shots of the draw mandelbrot class:



I've not included any comments, to draw the set is some pretty simple code, and to be honest I couldn't be bothered, it's taken a lot of work to get to this point....

DECIMAL_MAX is set to 8, so it's working to 8 decimal places. In theory the NumBer class can handle up to 200 dp in this context (the limit is available RAM), so that's quite a lot of zooming in. However to zoom in just to 50 dp, i'm gonna guess that my computer would have to working on this for 6 months or so !

As per my comments in the other link, it's a testament to the writers of the VMEmulator & Jack (am assuming that's mssrs Nisan & Schocken) really. I'm pleasantly surprised it worked.

If I can get some better images, I''l post them.

Lozminda

(I'm learning to sleep through the noise of my computer's fan, so other new skills too)


Reply | Threaded
Open this post in threaded view
|

Re: Mandelbrot set

ivant
Great job! I hope you're going to post the final image too :)
Reply | Threaded
Open this post in threaded view
|

Re: Mandelbrot set

Lozminda
(Foolishly on my part) The world seemed a little disinterested in my "achievements", so I was in no rush. I'm making some improvements in my NumBer class so hopefully in will run a little quicker, which means, hopefully, I can get better definition.

(Maybe I get get an image in 12 hrs !)

Unfortunately my contract's manager has just given me the deadline from hell (he's not a great organiser) so it's gonna be a few weeks before I can do any more work on this.. Having said that, the fact that another being has been positive has reinvigorated me no end, so I'll see if I can squeeze in a hour or two tonight.

Of course if the improvements don't go to plan it could be weeks.

Lzmda

Ps Thanks for your kind words !
Reply | Threaded
Open this post in threaded view
|

Re: Mandelbrot set

ivant
Tech people as general aren't known for our soft skills*. Don't get it personal.

I'm trying to improve myself in that respect, but it's hard. For example, it sometimes takes me half an hour, and a lot of worrying, to write a small email to a person I don't know, while outer people do such things seemingly effortlessly.

I was going to suggest that you look at this http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Trigonometry-td4026900.html, but I see you're already aware of it. Are you using cadet's implementation of floating point numbers, or your own?

----
* And this course totally ignores them! I hope next version would be nand&softskils2teteris! :)
Reply | Threaded
Open this post in threaded view
|

Re: Mandelbrot set

Lozminda
Sorry for delay, and I'm gonna apologise for more delay. Work has gone bonkers, I haven't done anything N2Ttrisy for a couple of weeks and it might be a few weeks more. Drat.

I Will get some more stuff up only death and serious injury will stop me (or my bosses dreadful organisational skills)

Re floating point, no I've used my own: far more complicated (& therefore slow) but hopefully more versatile.

In summary: The idea was to have a user defined number of sig. fig. only limited by the RAM of the VMEmulator.  Hence you could do things like (100!)/(201!!) and have an answer to as many sig fig as you wanted, say 100 d.p.

Re Soft skills, for what it's worth I think you're doing fine !  

I'll see if I can get some other NumBer applications up which are a bit easier than the mandlebrot set, just to wet folk's whistle...

Cheers