Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
chris_b
Baaaa!
Baaaa!
Posts: 961
Joined: Sun Dec 12, 2004 2:50 pm 0
Location: UK
Contact:

Re: Fast or slow? How about backwards?

Post by chris_b »

gumboot wrote:continuous zooms until it ran out of register file for the extended precision.
What precision is needed to zoom this deep?
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Fast or slow? How about backwards?

Post by GoatFoam »

chris_b wrote:
gumboot wrote:continuous zooms until it ran out of register file for the extended precision.
What precision is needed to zoom this deep?
More than I get through in a week.
User avatar
gumboot
Baaaaaaa!
Baaaaaaa!
Posts: 7652
Joined: Sun Aug 26, 2007 3:42 am 0
Location: trumpstain!

Re: Fast or slow? How about backwards?

Post by gumboot »

chris_b wrote:
gumboot wrote:continuous zooms until it ran out of register file for the extended precision.
What precision is needed to zoom this deep?
248 bits of fraction plus about four more for integer (I have eight because it's nice and round). Being 16-way parallel is what uses up most of the rest of the register file.

Thankfully, Mandelbrots can be reasonably accurately calculated with arithmetic cropped at exactly the number of bits required to resolve individual pixels. Not so for Julia, sadly (I have the code, but I don't have the dynamic precision scaling figured out). From this we can infer that the pixels in the final frame are 2**-248 apart -- or 9E74 times smaller than the big circle on the first frame.

Rendering at 720p normally take a few hours -- I don't really know how many.
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Fast or slow? How about backwards?

Post by Barney »

gumboot wrote: What precision is needed to zoom this deep?
I had a friend a while ago who spent months and months working on a super-precision mandelbrot generator, and left it running for weeks on end, constantly tweaking the coords as he zoomed. Eventually, he claimed to have found the bottom of the set...

I pointed out that he'd run out of precision, not found the bottom, and we weren't friends after that.
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
Istar
Baaaaaa!
Baaaaaa!
Posts: 4869
Joined: Mon Apr 22, 2002 4:42 pm 0
Location: London, UK.

Re: Show us yer programming projects!

Post by Istar »

How did that happen? I see two scenarios:

1. "I say, old chap, I suspect that rather than hitting the 'bottom' of an essentially infinitely recursive mathematical domain, what you've actually done is merely exceeded the precision capability of your [code | hardware] and started getting zeroes back from the function. I daresay a little probing and modification will highlight the subtle flaw, and allow you to remedy the problem and thus continue exploring this wonderous arena of shapes and colour that you have been sharing with me, your truest and lifelong friend".

2. "You fucking numpty cuntflap! Not only are you a fucking sorry excuse for a human being, but you've also managed to completely arse-up what is virtually a primary-school-mathematics-level equation by using variables and techniques that have inherent limits on the precision of the calculated result. If proof were needed of your utter ineptitude at both mathematics and coding, this error (one which, I might point out, even a basic understanding of the underlying mechanics of modern-day computer technology would have helped you avoid) demonstrates beyond doubt the reason why I pray nightly that you never breed and consequently perpetuate the blight of your moronic bloodline upon this good green Earth. I suggest you abandon this fundamentally flawed and execrable pile of shite you call a 'project' and return to that other as-yet-unmastered skill you've always had trouble with, specifically the tying of shoelaces. Now close your mouth, start breathing through your nose, and pick your fucking knuckles up from the floor when you walk. You cock."

It was the latter, wasn't it? ;)
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

They were both a bit too polite if you ask me.
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

I basically sat down and went through the code with him, pointing out (through the use of breakpoints and examining the variables) that he'd run out of precision. This wasn't so bad, but the boss was watching at the time - firstly he didn't like the fact that work's spanky new 386s were being used to generate pretty pictures, and secondly he really took the piss that the project leader was having "his code ripped apart by the tea-boy" (those were his words, not the boss!).

Things went downhill from there; he ended up leaving claiming that I'd set him up. It was really, really weird. Oh yes, he also attacked me physically outside of work - I've never understood people like that :(

It was at that point that I started on him with elements of the second scenario - and ended up calling him a cock.
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
beerman
Baaaaa!
Baaaaa!
Posts: 1305
Joined: Wed Dec 24, 2003 11:22 pm 0
Location: The Beercave
Contact:

Re: Show us yer programming projects!

Post by beerman »


Little something I'm working on with the subtle and understated title of Gun Bastard.

Written in Pygame with OpenGL handling the visuals for extra speed, and starring Starsky - the Bunny of Doom :D
"even had I suspected then the truly horrifying suffering and amazing loss of life that would be caused by our well-meaning enterprise... I'd have done it anyway. Only more so."
Lagertron for Android It's Robotron at the pub!
My stuff
matt
Sheepie Whore
Sheepie Whore
Posts: 14826
Joined: Mon Apr 22, 2002 4:07 pm 0
XBL Gamertag: gingerbeardman
PSN: wirehang
Location: here && there
Contact:

Re: Show us yer programming projects!

Post by matt »

I used to have a rabbit called Starsky
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Re: Show us yer programming projects!

Post by piku »

matt wrote:I used to have a rabbit called Starsky
Because it lived in a hutch, right?
return (0);
User avatar
beerman
Baaaaa!
Baaaaa!
Posts: 1305
Joined: Wed Dec 24, 2003 11:22 pm 0
Location: The Beercave
Contact:

Re: Show us yer programming projects!

Post by beerman »

Why else? :D
"even had I suspected then the truly horrifying suffering and amazing loss of life that would be caused by our well-meaning enterprise... I'd have done it anyway. Only more so."
Lagertron for Android It's Robotron at the pub!
My stuff
User avatar
t0ne
Baaaaaa!
Baaaaaa!
Posts: 3134
Joined: Wed Sep 11, 2002 8:48 am 0
Location: Bristol

Re: Show us yer programming projects!

Post by t0ne »

beerman wrote:Why else? :D
It had black curly hair and a penchant for cardigans ?
User avatar
Istar
Baaaaaa!
Baaaaaa!
Posts: 4869
Joined: Mon Apr 22, 2002 4:42 pm 0
Location: London, UK.

Re: Show us yer programming projects!

Post by Istar »

Plus it drove around catching some wicked air on the crests of hills in its pimped Gran Torino. ;)
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

'k. I got a new version of my image processing toolkit out, and made some pages to the web page. It might be possible to follow what is going on now:

http://www.spectral3d.co.uk/Vapourware/tonemap/

Any feedback about what I should clarify next would be welcome.

I know I need proper module docs, but I haven't found the time yet.
User avatar
PaulCunningham
Baaaaa!
Baaaaa!
Posts: 1218
Joined: Sun Jan 18, 2004 11:47 pm 0
Location: Walsall, England
Contact:

Re: Show us yer programming projects!

Post by PaulCunningham »

XNA version of Titan Attacks...

Image
Cheers,
Paul Cunningham
Pumpkin Games
Post Reply