Dark Bit Factory & Gravity
ARCHIVE => Archive => Useful links => Topic started by: Rbz on August 01, 2009
-
For all of you math lovers, check this out:
http://fragsworth.com/image_functions/
http://fragsworth.com/journal/clever_mathematical_creations/
Lots of fun making images out of sin and cos functions ;D
-
Really cool, Here's one I made :D
(sin(x*y*y)-sin(x*x/y)+(cos(y*y/x)/y)-(x/y))*(sin(x*y*y)-sin(x*x/y))
(View in high quality, it gives a kind of warped chessboard merged with keftales).
-
QUite cool too.
x+y/r*sin(g)+(x*y/r*sin(r))
-
Fire effect:
r*2+g+pow(y/1.8+sin(x),1.0)+(sin(x*1.5)*sin(y))
-
X marks the spot...
x+y*3*sin(x/y)
Amazing fire btw!
-
Cool stuff.
-
My own attempt at fire...
(r*3+(x+y)+x*sin((y+90)*pi)-x*cos((y)*pi))-(b*2+(x-y)+x*sin((y+90)*pi)-x*cos((x)*pi))
Diamond shaped atm
-
texture:
r+g*sin(x)+cos(y)*sin((x*y)/pi)
-
Looks a nifty find.
not to be thick but what are you supposed to do with those formulas?
obviously r,g,b are the colours and I take it, in 0-255.
-
The formula is explained in the website, you have r,g,b,x,y varialbe to play with and all the trig you can throw at it.
Play with the formulas, if it doesnt evaluate, the site will tell you.
-
very nice site! have to check how to reproduce it with own code...
here are some results i have created:
sin(x)*64+cos(y)*64
sin(x)*64+cos(y)*32
sin(x)*1
sin(x)*64
sin(x)*64+cos(y)*32+floor(x*y)
r+g*sin(x)+atan(y)*sin((x+y)/pi)
r+g*sin(x)+atan(y)*sin((x+y)/cos(b))
it makes so much fun! :)
-
Rgb plasma thing...
(sin(r+x)*cos(g+y)*atan(b+(x-y)))
-
awesome, so when will you guys write a tutorial for me about this stuf f:)
-
Thats a very cool site indeed.
And cool formulas posted here, too!
-
heres my two
http://fragsworth.com/image_functions/23162/
http://fragsworth.com/image_functions/23141/
-
I like that you managed to write something on one of them :)
-
here is my newest texture for your dreams of confectionery :P
r+(g/4)*sin(x/4)+atan(y/4)*sin((x+y*b)/cos(b))
next i will try to make a small DBF sign advert there :P
-
here is my newest texture for your dreams of confectionery :P
r+(g/4)*sin(x/4)+atan(y/4)*sin((x+y*b)/cos(b))
Sweet!
-
Yeah... just a small DBF sign on the site :P
(1)if((y+6<11.5)and(floor((x)*3)%80,floor((y+10)*2)%80)in((1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,5),(3,1),(3,5),(4,2),(4,3),(4,4),(6,1),(6,2),(6,3),(6,4),(6,5),(7,1),(7,5),(8,1),(8,3),(8,5),(9,2),(9,4),(11,1),(11,2),(11,3),(11,4),(11,5),(12,1),(12,3),(13,1),(13,3),(14,1)))else(-1)
Next i will try to combine a texture with this sign :P
-
K+
Here's my (feeble) attempt with your sign..
((1)if((y+6<11.5)and(floor((x)*3)%80,floor((y+10)*2)%80)in((1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,5),(3,1),(3,5),(4,2),(4,3),(4,4),(6,1),(6,2),(6,3),(6,4),(6,5),(7,1),(7,5),(8,1),(8,3),(8,5),(9,2),(9,4),(11,1),(11,2),(11,3),(11,4),(11,5),(12,1),(12,3),(13,1),(13,3),(14,1)))else(-1))+(sin(x*y)-cos(x*y*x))
-
thanks for karma... K+ back for the nice texture with the sign ;)
-
Its such a cool idea to advertise DBF on there like that! :D
-
its not really as i want it... only half filled :P
(1)if((y+4<4.5)and(floor((x)*8)%20,floor((y*4)*2)%20)in((1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,5),(3,1),(3,5),(4,2),(4,3),(4,4),(6,1),(6,2),(6,3),(6,4),(6,5),(7,1),(7,5),(8,1),(8,3),(8,5),(9,2),(9,4),(11,1),(11,2),(11,3),(11,4),(11,5),(12,1),(12,3),(13,1),(13,3),(14,1)))else(-1)
next a very special version will come :P
-
yeah... here it is (fixed version)
(1)if((y+4<16)and(floor((x)*8)%20,floor((y*4)*2)%20)in((1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,5),(3,1),(3,5),(4,2),(4,3),(4,4),(6,1),(6,2),(6,3),(6,4),(6,5),(7,1),(7,5),(8,1),(8,3),(8,5),(9,2),(9,4),(11,1),(11,2),(11,3),(11,4),(11,5),(12,1),(12,3),(13,1),(13,3),(14,1)))else(-1)
-
Great!
(r*3+sin(x*x*x*y))-((1)if((y+4<16)and(floor((x)*2)%20,floor((y*1)*2)%20)in((1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,5),(3,1),(3,5),(4,2),(4,3),(4,4),(6,1),(6,2),(6,3),(6,4),(6,5),(7,1),(7,5),(8,1),(8,3),(8,5),(9,2),(9,4),(11,1),(11,2),(11,3),(11,4),(11,5),(12,1),(12,3),(13,1),(13,3),(14,1)))else(-1))
-
Damn..... this is to long and dont work... it would be the ultimate advert :P
(1)if((y+1)and(floor((x)*8)+80,floor((y*4)+40))in((20,72),(20,73),(20,74),(20,75),(20,76),(20,77),(20,78),(20,79),(20,80),(25,72),(25,73),(25,74),(25,75),(25,76),(25,77),(25,78),(25,79),(25,80),(26,72),(26,73),(26,74),(26,75),(26,76),(26,77),(26,78),(26,79),(26,80),(27,73),(28,74),(29,75),(30,76),(31,77),(32,78),(33,72),(33,73),(33,74),(33,75),(33,76),(33,77),(33,78),(33,79),(33,80),(34,72),(34,73),(34,74),(34,75),(34,76),(34,77),(34,78),(34,79),(34,80),(36,112),(36,113),(36,114),(36,115),(36,116),(36,117),(36,118),(36,119),(36,120),(36,121),(36,122),(36,123),(37,72),(37,112),(37,113),(37,114),(37,115),(37,116),(37,117),(37,118),(37,119),(37,120),(37,121),(37,122),(37,123),(38,72),(38,112),(38,113),(38,122),(38,123),(39,72),(39,112),(39,113),(39,122),(39,123),(40,72),(40,112),(40,113),(40,122),(40,123),(41,72),(41,73),(41,74),(41,75),(41,76),(41,77),(41,78),(41,79),(41,80),(41,112),(41,113),(41,122),(41,123),(42,72),(42,112),(42,113),(42,122),(42,123),(42,137),(42,138),(42,139),(42,140),(43,72),(43,113),(43,122),(43,135),(43,136),(43,137),(43,138),(43,139),(43,140),(43,141),(43,142),(44,72),(44,113),(44,122),(44,134),(44,135),(44,142),(44,143),(45,72),(45,113),(45,114),(45,115),(45,120),(45,121),(45,122),(45,134),(45,143),(46,114),(46,115),(46,116),(46,117),(46,118),(46,119),(46,120),(46,121),(46,133),(46,134),(46,143),(46,144),(47,117),(47,118),(47,133),(47,144),(48,133),(48,144),(49,72),(49,73),(49,74),(49,75),(49,76),(49,77),(49,78),(49,79),(49,80),(49,133),(49,144),(50,72),(50,75),(50,80),(50,133),(50,144),(51,72),(51,75),(51,80),(51,115),(51,116),(51,117),(51,118),(51,119),(51,120),(51,121),(51,122),(51,123),(51,134),(51,143),(52,72),(52,75),(52,80),(52,115),(52,118),(52,123),(52,134),(52,143),(53,72),(53,75),(53,80),(53,115),(53,118),(53,123),(53,135),(53,142),(54,50),(54,51),(54,72),(54,75),(54,80),(54,115),(54,118),(54,123),(55,51),(55,52),(55,53),(55,72),(55,80),(55,115),(55,118),(55,123),(56,54),(56,55),(56,56),(56,72),(56,80),(56,115),(56,118),(56,123),(57,56),(57,57),(57,58),(57,115),(57,123),(57,138),(57,139),(57,140),(57,141),(58,54),(58,55),(58,56),(58,57),(58,58),(58,115),(58,123),(58,137),(58,138),(58,139),(58,140),(58,141),(58,142),(59,52),(59,53),(59,54),(59,136),(59,137),(59,143),(60,50),(60,51),(60,52),(60,72),(60,73),(60,74),(60,75),(60,76),(60,77),(60,78),(60,79),(60,80),(60,136),(60,144),(61,50),(61,51),(61,72),(61,73),(61,74),(61,75),(61,76),(61,77),(61,78),(61,79),(61,80),(61,135),(61,144),(62,50),(62,51),(62,52),(62,53),(62,72),(62,76),(62,115),(62,116),(62,117),(62,118),(62,119),(62,120),(62,121),(62,122),(62,123),(62,135),(62,144),(63,53),(63,54),(63,55),(63,56),(63,72),(63,76),(63,115),(63,116),(63,117),(63,118),(63,119),(63,120),(63,121),(63,122),(63,123),(63,144),(64,56),(64,57),(64,58),(64,72),(64,76),(64,115),(64,116),(64,136),(64,143),(65,55),(65,56),(65,57),(65,58),(65,72),(65,76),(65,77),(65,117),(65,118),(65,136),(65,137),(65,142),(65,143),(66,52),(66,53),(66,54),(66,55),(66,72),(66,76),(66,77),(66,78),(66,119),(66,120),(66,137),(66,138),(66,139),(66,140),(66,141),(66,142),(67,50),(67,51),(67,52),(67,72),(67,75),(67,78),(67,79),(67,80),(67,120),(67,121),(67,139),(67,140),(68,50),(68,72),(68,73),(68,74),(68,75),(68,80),(68,120),(68,121),(69,74),(69,118),(69,119),(70,117),(71,50),(71,115),(71,116),(71,136),(71,137),(71,138),(71,139),(71,140),(71,141),(71,142),(71,143),(71,144),(72,50),(72,51),(72,52),(72,53),(72,80),(72,115),(72,116),(72,117),(72,118),(72,119),(72,120),(72,121),(72,122),(72,123),(72,136),(72,137),(73,53),(73,54),(73,55),(73,78),(73,79),(73,80),(73,137),(73,138),(74,56),(74,57),(74,58),(74,76),(74,77),(74,139),(74,140),(75,55),(75,56),(75,57),(75,58),(75,74),(75,75),(75,141),(75,142),(76,53),(76,54),(76,55),(76,72),(76,73),(76,118),(76,119),(76,141),(76,142),(77,50),(77,51),(77,52),(77,72),(77,116),(77,117),(77,118),(77,119),(77,120),(77,121),(77,140),(77,141),(78,50),(78,51),(78,73),(78,74),(78,115),(78,116),(78,121),(78,122),(78,138),(78,139),(79,50),(79,51),(79,52),(79,75),(79,76),(79,77),(79,115),(79,122),(79,136),(79,137),(80,52),(80,53),(80,54),(80,55),(80,77),(80,78),(80,123),(80,136),(80,137),(80,138),(80,139))))else(-1)
-
'dbf gvy' sign :P
(1)if((y+8<16)and(floor((x)*4)%34,floor((y*3)*2)%20)in((1,2),(1,3),(1,4),(2,2),(2,4),(3,1),(3,2),(3,3),(3,4),(5,1),(5,2),(5,3),(5,4),(6,2),(6,4),(7,2),(7,3),(7,4),(9,1),(9,2),(9,3),(9,4),(10,1),(10,3),(11,1),(17,1),(17,2),(17,3),(17,4),(18,1),(18,4),(19,1),(19,3),(19,4),(21,1),(21,2),(21,3),(22,4),(23,1),(23,2),(23,3),(25,1),(25,2),(26,3),(26,4),(27,1),(27,2),))else(-1)
(http://fragsworth.com/media/uploads/images/09/08/02/14/37/5f3d1c2c7252e4f916844145df66db4ab2e2264d6005f23b2f59bb23.jpg)
-
I know the imagination compo is over... however here is another small contribution my me :D
tan(r+g)-(r*3+sin(x*x*x*y))-((1)if((y+4<16)and(floor((x)*2)%20,floor((y*1)*2)%20)in((1,4),(1,5),(1,7),(1,8),(1,9),(2,3),(2,10),(3,11),(4,1),(4,11),(5,1),(5,12),(6,1),(6,12),(7,1),(7,12),(8,1),(8,12),(9,1),(9,11),(10,2),(10,10),(10,11),(10,12),(11,3),(11,4),(11,9),(11,10),(11,13),(12,5),(12,6),(12,7),(12,8),(12,10),(12,14),(13,11),(13,15),(14,12),(14,16),(15,13),(15,16),(16,14),(16,15)))else(-1))
Original texture by shockwave i think...!? Modified by adding imagination image by va!n
(http://fragsworth.com/media/uploads/images/09/08/02/14/51/01e548d60e31e62d79b20598cb526abe2e218ac644d8e33705b506dd.jpg)
-
Your advertisements on my site caught my attention. :)
rbz's fire effect in video:
http://fragsworth.com/video_functions/675/ (http://fragsworth.com/video_functions/675/)
I tried va!n's giant ass function by removing the character limit, but it didn't work too well.
http://fragsworth.com/image_functions/23361/ (http://fragsworth.com/image_functions/23361/)
-
i have tried to create something with "dbf interactive"... but sadly i failed... because max 400 chars for the formular are allowed... so lets try to think and calculate..
for each pixel position we would use about 8 bytes == ( x x , y y ) == this gives us 7 chars and adding a ' , ' we are at 8 chars for one pixel position... Let us continue with the calculation... As the maximum forumar line can handle only up to 400 chars, we just calculate 400 chars / 8 chars for one pixel position == 50 Pixels... So at least, we can max handle 50 or let us say something around 40-45 pixels... ^^
-
@fragsworth:
hello and :hi:
Nice to see you here on this great community... btw, the animated fire effect is really awesome :)
-
Cool, nice to see ya Fragsworth dude! :)
:hi:
-
Your advertisements on my site caught my attention. :)
Ha ha! Lol!
rbz's fire effect in video:
http://fragsworth.com/video_functions/675/ (http://fragsworth.com/video_functions/675/)
How cool is that? Thanks for posting!
Jim
-
@fragsworth:
Hey, welcome to this community. Your site is very cool!
@va!n:
Greate DBF GVY pattern ;-)
-
I'm not that cool at math... but AWESOME SITE fragsworth!
@all: someone has ever tried ARCalc?
http://www.rikarends.com/riks-calculator/ (http://www.rikarends.com/riks-calculator/)
-
\o/
Hi Fragsworth, heh thanks for being good humoured about the ad hoc advertising ;)
The video of the fire effect rules :)
If you want a link here I will add you to the links page.
-
Ripples...
x*.1*sin(3*sin(hypot(x,y))-3*cos(hypot(x,y)))
-
@shockwave:
very nice one! Here is an animated version.
http://fragsworth.com/video_functions/1049/ (http://fragsworth.com/video_functions/1049/)
and a small another anim version:
http://fragsworth.com/video_functions/1047/ (http://fragsworth.com/video_functions/1047/)
-
Nice, I like that :D
-
Awesome!
-
just changed the animation direction, whichs look much more realisti i think ^^
http://fragsworth.com/video_functions/1054/ (http://fragsworth.com/video_functions/1054/)
I love this math... however i still have problems to understand the technique behind this...
This is something, which would be really cool at scool when learning math insteat just writing boring stuff on paper ^^
-
Yes that is a definate improvement. It's exactly as I envisioned it :D
-
Fire effect:
r*2+g+pow(y/1.8+sin(x),1.0)+(sin(x*1.5)*sin(y))
Very nice! I just found this thread and seeing since I managed to get an expression parser into Plane9 just a few days ago I had to try to redo this effect in it. I had to tweak the expression a bit and also added a scale and movement of the "pixels" in Z. The "pixels" are actually any kind of objects. In this case squares with a blob texture on them.
The resulting expression I ended up using
tx = (x/numobjectsx)*20-10;
ty = (y/numobjectsy)*20-10;
tt = 1-((ty/3+sin(tx+time)+(sin(tx*1.5)*sin(ty+time)))+1)/2;
scale.x = scale.z = tt;
pos.z = tt;
col.r = tt*3;
col.g = tt;
col.b = tt*0.5;
And the final image
(http://www.plane9.com/forumimages/2009-10-14-firewalker.png)
Math is neat :)
-
Great looking image :)
-
Indeed. Looks great!
-
Yes, screenshot looks really nice! :)
Btw, i found some older sources on my drive when i have tried to code/recode effects from the fragsworth website... so i have compiled and attached my old (totally unoptimized versions)... Test1 was an idea for a 1k intro but as i saw, rbz released something simular in the meanwhile ;)
-
Yes, screenshot looks really nice! :)
Btw, i found some older sources on my drive when i have tried to code/recode effects from the fragsworth website... so i have compiled and attached my old (totally unoptimized versions)... Test1 was an idea for a 1k intro but as i saw, rbz released something simular in the meanwhile ;)
Great looking effects! High res yet still fast.
-
Nice, I prefer the fire looking one the best, it had nicer colours.
The other effect was still interesting though, both ran nice and fast on this old machine.
-
@Va!n: please produce an intro or demo with those in, looks awesome :)
-
Indeed. Smooth and cool looking fx.
-
Thanks for your feedback guys! ;)
Yes, i would really like to code the fire effect as 1k intro... But by the way i just would like know your personally opinion... Is it worth to code this effect in a 1k intro (i.e. with music if i get managed it but it would be hard) or does it make more sence to code this and some other effects in a 4k intro?
In a 1k intro version, the effect will be shown as the test version! However i want like to code using DirectX9 (i.e. DX10 or DX11 - depents on which framework would compile/pack the smallest exe with latest VS! My mainproblem is still, i dont know atm how to code the effect using DirectX nor using very fast PixelShaders. So both ways (DX == drawing pixels on texture or directly to the screen) or using PixelShaders are totally new for me!
So you see the problem for me... i am full of ideas for some possible nice 1k, 4k and 64k intros (a very simple but nice 64k intro), but i have to learn how to code things using DX / Pixelshaders! :( This costs a lot of time... else you would see some more released stuff by me! Possible me still need a second hand, also like someone (a good friend) in the scene living near me and where its possible to meet and learn from ;)
I didnt coded in C/CPP since my last 1k intro (inofficial invitation for BP2009)... I have to buy/install the final release of Win7 64bit and then installing VisualStudio and trying again to start coding DX stuff!
So i think, i have to start step by step and releasing tiny things first like 1k effect instead a complete 4k, where i miss the needed coding technique / knowledge atm... (coding stuff with PB isnt the big problem for me since its very basic but it has some sites i dont like... so my wish is to code needed stuff (Win32 Appz, Win32 with DX and maybe PS stuff) somewhere in the future ^^
Do you think, its okay to release the fire effect as 1k intro?
-
Do you think, its okay to release the fire effect as 1k intro?
Most of an 1k-intro is spend on windows overhead but your effect doesn't make use of the windows-api (which means DirectX or OpenGL) - so how about 256 bytes?
-
@hellfire:
256 byte DOS intro? I am not a fan of those DOS intros like 64, 256, 512 byte intros... because they do not work longer since Win7... Personally i think DOS times and those direct mode 13h access is pretty much ancient history. However i am very amazed what people even code in such tiny code - its awesome and you are right, most code is windows overhead!
Btw, coding the effect in mode 13h (i think you mean this, right?) supports only 256 colors afaik... so i think i have to generate an own color-table... i have only tried to code a DOS mode 13h thing (just black screen and printing text on it) over 7 years ago! http://pouet.net/prod.php?which=17598 (http://pouet.net/prod.php?which=17598)
So you think, it would make no sence to code it using DX or Pixelshader as 1k intro? (still not interesting / to boring / to simple for a 1k?)