[Staff] Microhertz - TI-83/TI-83+ Scene Demo

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured products are not products of MaxCoderz)

Moderator: MaxCoderz Staff

User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Jim e wrote:
; Leave the LCD driver in a happy state!
You're so considerate of the lcd. Most people wouldn't think twice about leaving it happy, most people just order her around. :P
Hehe, mainly because ionFastCopy relies on the driver being in x-increment mode ;)
Now would I be correct in assuming that the lens effect is a BIG table...
Yes... 2048 bytes. I only just remembered that it was 32*32*2 (I forgot that there were two bytes per element - x and y). That's pretty outrageous, seeing as the lens could be reduced to a quarter of the size by flipping it around 90 degrees... Even bit-packing (the range only goes up to 31) would drop that to 1280 - and if quartering the dimensions of the table, would only need one nybble per element - so, a 256 byte table - but seeing as this is a sort of run-once program (this is not the sort of thing with much replay value) I wasn't too fussed about the binary size at the end. (And if that's not a run-on sentence, I don't know what is). I need to fix the typos (Maxcoderz -> MaxCoderz), so maybe I'll have a shot at reducing the sizes of the lookup. RLE compression on the flipcard graphics might also be nice, but Brass didn't support that when I wrote it. ;)
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

WOW, I now know that "Anything Is Possible"!!! I really like the tunnel, how you can make it faster and slower and directions of it!
pacHa
Sir Posts-A-Lot
Posts: 190
Joined: Sun 09 Jan, 2005 9:51 am
Contact:

Post by pacHa »

Nice stuff Ben :)

Just one thought : I wish your demos had a kind of 'storyline'. I mean, this one is - on this side - far better than Pixel Madness since it has a transition effect, but in the end it's still a few effects packed together. In other words, I'm impressed by the technical stuff (even if it's 'basic' trig =)), but as a whole it ends up as a tech show, nothing more imo. tr1p's lcbhaa was nicer from this point of view.

Take it as constructive criticism !
Image
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

I agree with pacHa, but still... hawt!

..hawt hawt hawt! It burns us, it burns us!
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

BAH! CODE SPEAKS LOUDER THAN WORDS!!! (caps lock intended)
Image
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

The lens effect is a very good example of a load-time generated distortion map, since you can change the behavior and various dimensions anytime to fool the audience that it's realtime :)

Pseudo-approach which I wrote off the top of my head:
Let's say you're on "(x, y) -> (r, t)" in the lens ('x' and 'y' are cart. coords, 'r' and 't' are polar). For a convex lens with the flat side down and the convex side being a spherical shell covering 90 degrees, the surface normal points with angle "an = r * pi/4" (direction pointing away from the center of the lens). The thickness of the lens, with sharp edges, is "h = cos(an) - 1/sqrt(2)". Refraction gives "n1*sin(a1) = n2*sin(a2)" which in this case can be written as "ar = an - asin(sin(an)/1.5)" where 'ar' is the angle against the vertical. Radial displacement due to trip the rays make through the lens gives "dr = h*tan(ar)". Refraction in the flat bottom can be skipped since the background is most probably touching the lens directly. Multiply 'dr' with (x, y) and you got the distortion for one point.

Since lens effects were declared as being cool and Ben had a rather "anticlimactic" way of solving it, I thought I'd just bring up the details for the interested :) There are of course simpler ways (like setting radial displacement as "dr = scale*r"...), but "true" simulations can be fun.

EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?
Last edited by coelurus on Wed 15 Feb, 2006 10:04 pm, edited 1 time in total.
User avatar
DJ_O
Calc King
Posts: 2324
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post by DJ_O »

pacHa wrote:Nice stuff Ben :)

Just one thought : I wish your demos had a kind of 'storyline'. I mean, this one is - on this side - far better than Pixel Madness since it has a transition effect, but in the end it's still a few effects packed together. In other words, I'm impressed by the technical stuff (even if it's 'basic' trig =)), but as a whole it ends up as a tech show, nothing more imo. tr1p's lcbhaa was nicer from this point of view.

Take it as constructive criticism !
maybe he should make a game with it :) or a standalone game intro like Final Fantasy 1.189 (with animations of course). Also I was wondering if those kind of special effects could be used as magic animations in BASIC and ASM rpgs *cough*new xLIB feature?*cough*
ImageImageImageImage
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

coelurus wrote:The lens effect is a very good example of a load-time generated distortion map, since you can change the behavior and various dimensions anytime to fool the audience that it's realtime :)

Pseudo-approach which I wrote off the top of my head:
Let's say you're on "(x, y) -> (r, t)" in the lens ('x' and 'y' are cart. coords, 'r' and 't' are polar). For a convex lens with the flat side down and the convex side being a spherical shell covering 90 degrees, the surface normal points with angle "an = r * pi/4" (direction pointing away from the center of the lens). The thickness of the lens, with sharp edges, is "h = cos(an) - 1/sqrt(2)". Refraction gives "n1*sin(a1) = n2*sin(a2)" which in this case can be written as "ar = an - asin(sin(an)/1.5)" where 'ar' is the angle against the vertical. Radial displacement due to trip the rays make through the lens gives "dr = h*tan(ar)". Refraction in the flat bottom can be skipped since the background is most probably touching the lens directly. Multiply 'dr' with (x, y) and you got the distortion for one point.

Since lens effects were declared as being cool and Ben had a rather "anticlimactic" way of solving it, I thought I'd just bring up the details for the interested :) There are of course simpler ways (like setting radial displacement as "dr = scale*r"...), but "true" simulations can be fun.

EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?
Nope it's not you, it is in fact true :roll:
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

coelurus wrote:EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?
It's more like I don't follow what you're saying; the maths tends to confuse me a lot (which is why I used my horrible solution).
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Oh, but I hope that's not reason enough to abandon a thread? These threads are the most viable regarding realtime calc programming, so start discussing something else that's relevant (not "could somebody make a game out of this?"). I'm happy as long as threads like this one are active, knowing that this forum is used to further calc tech, not just for chit-chat.

I wouldn't even mind a bit if my ramblings were totally ignored as if they had never been there :)
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

Totally AWESOME!!! That blew my mind...
cheese=yum
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

This thing is INSANE!
Image
lloydkirk1989
Calc Wizard
Posts: 680
Joined: Wed 22 Dec, 2004 5:37 am
Location: West Palm Beach,FL
Contact:

Post by lloydkirk1989 »

nice work ben, the graphics are crazy.
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

HOLY SHIT! Dude, that was...I mean, how the...what on the...ben, you need to...well...make something more out of these...because it seems like a travesty something so beatiful would be JUST a tech demo.
Post Reply