Rather odd mathmatical plottings.

A place where you can chat about anything that isn't to do with games!
Post Reply
User avatar
Pixel_Outlaw
Posts: 2646
Joined: Sun Mar 26, 2006 3:27 am

Rather odd mathmatical plottings.

Post by Pixel_Outlaw »

These are some very odd images generated by tinkering around with hommade plotting programming functions.

Image

Image

Image
Image


I find them sort of interesting so I'd post.
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

looks like that old dos program acidwarp. it came with instructions on how to build a crude projector with a monitor, a wine box, and a fresnel lens
User avatar
BulletMagnet
Posts: 14162
Joined: Wed Jan 26, 2005 4:05 am
Location: Wherever.
Contact:

Post by BulletMagnet »

The next Cave TLB's patterns?
trivial
Posts: 417
Joined: Sun Jan 30, 2005 2:27 am

Post by trivial »

For more moiré fun, check out Digital Video Essentials in high definition. These look like some of the bandwidth test patterns.
User avatar
Udderdude
Posts: 6294
Joined: Thu Feb 16, 2006 7:55 am
Location: Canada
Contact:

Post by Udderdude »

BulletMagnet wrote:The next Cave TLB's patterns?
No way, I definitely see some safe spots in there. :D
User avatar
Specineff
Posts: 5768
Joined: Wed Jan 26, 2005 12:54 am
Location: Ari-Freaking-Zona!
Contact:

Post by Specineff »

My God, it's full of stars.
Don't hold grudges. GET EVEN.
User avatar
UnscathedFlyingObject
Posts: 3636
Joined: Wed Jan 26, 2005 1:59 am
Location: Uncanny Valley
Contact:

Post by UnscathedFlyingObject »

It's like something you'd see when having a bad trip.
"Sooo, what was it that you consider a 'good salary' for a man to make?"
"They should at least make 100K to have a good life"
...
User avatar
Super Laydock
Posts: 3094
Joined: Tue Jan 25, 2005 10:24 pm
Location: Latis / Netherlands

Post by Super Laydock »

Not surprisingly this post coming from the man who made a post about fractals already... ;)

And though I suck at mathematics, I love this mathematically produced images. They're beyond awesome! :D
Barroom hero!
Bathroom hero!
User avatar
Joe T.
Posts: 368
Joined: Fri Jan 18, 2008 4:40 am

Post by Joe T. »

I've fallen through a few of these after an enormous bump of ketamine before...I must have serious number crunching ability somewhere behind my cranial receptor units after all.
User avatar
Pixel_Outlaw
Posts: 2646
Joined: Sun Mar 26, 2006 3:27 am

Post by Pixel_Outlaw »

I forgot the formula I plotted but it involved distance from the center of the screen coupled with moire lines and interpolation between 2 colors.

"Turn off your mind, relax and float downstream, it is not dying it is not dying"

Here is the source in blitzmax.

You will need to change some of the hidden distance formulas to the real one to get different effects.

Code: Select all

Strict
SeedRnd(MilliSecs()) 
Global points:TList = New TList
Type point
	Field x:Int, y:Int
End Type

Function distance:Int(x:Int, y:Int, x2:Int, y2:Int) 
	Return Sqr(((x2 - x) * (x2 - x)) + ((y2 - y) * (y2 - y))) 
End Function

rem
Function distance:Int(x:Int, y:Int, x2:Int, y2:Int) 
	Return Sin(Sqr(((x2 - x) * (x2 - x)) + ((y2 - y) * (y2 - y)))) * 1000
End Function


Function distance:Int(x:Int, y:Int, x2:Int, y2:Int) 
	Return atan(Sqr(((x2 - x) * (x2 - x)) + ((y2 - y) * (y2 - y)))) * 1000
End Function


Function distance:Int(x:Int, y:Int, x2:Int, y2:Int) 
	Return cos(Sqr(((x2 - x) * (x2 - x)) + ((y2 - y) * (y2 - y)))) * 1000
End Function



Function distance:Int(x:Int, y:Int, x2:Int, y2:Int) 
	Return tan(Sqr(((x2 - x) * (x2 - x)) + ((y2 - y) * (y2 - y)))) * 1000
End Function
endrem


Function average_distance(x:Int, y:Int)  
Local d:Int = 1000000
For Local P:point = EachIn(points) 
Local dd:Int = distance(x, y, p.x, p.y) 
If dd < d
d = dd
EndIf
Next

Return d
End Function

Graphics 640, 480

Local m:Float = MilliSecs() 

For Local i:Int = 0 To 0
	Local P:point = New point
	p.x = Rand(640) 
	p.y = Rand(480) 
	ListAddLast(points, p) 
Next

Local cc:Float
For Local x:Int = 0 To 639
	For Local y:Int = 0 To 479
	Local ad:Int = average_distance(x, y) 
	If ad Mod 3 = 0
	cc = Abs(Sin(ad * 4)) 
	SetColor(cc * 255, cc * 255, 255 - cc * 255) 
	Plot(x, y) 
	EndIf
	Next
Next

Notify(String(MilliSecs() - m)) 
Flip
WaitKey() 
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
Post Reply