Code Snippets > Misc ( Created 17 November 2016 | Last Edited 17 November 2016)

 Face Formula by Andy_A | No VotesA face drawn from a formula Written inBlitz No rhyme or reason for it, just liked the idea. ;https://www.niksula.hut.fi/~hkankaan/Homepages/face.html ;The Face Formula (tm) AppTitle "Hannu's Face Formula" Graphics 640, 480, 32, 2 SetBuffer BackBuffer() Const c1# = -8040. : Const c2# = 114509. Const c3# = 33244. : Const c4# = 2367. Const c5# = -2080. : Const c6# = 61833. Const c7# = 18618. : Const c8# = 1369. Const c9# = -1020. : Const c10# = 52967. Const c11# = 16497.: Const c12# = 1246. Const c13# = 4309. : Const c14# = 1384. Const c15# = 86400. Local x#, y#, scalex#, scaley#, tx#, ty# Local t1#, t2#, t3#, t4#, t5#, t6#, t7# Local boxsize%, pix% Local y1#, y3#, x1#, x2#, x3#, x4#, x5#, x6# Local y2#, yc#, y4#, y5# scalex = 50.0 scaley = 50.0 tx = 160.0 ty = 100.0 boxsize = 3 pix = CreateImage(boxsize,boxsize) SetBuffer(ImageBuffer(pix)) Color 255,255,255 Rect 0,0,boxsize,boxsize,True SetBuffer BackBuffer() ClsColor 22,22,48 Cls Color 255,255,0 Text 320, 5, "The Face Formula (tm)", True Color 255,255,255 Text 320, 20, "((y-3)(y-1)(80(x-5)(x-4)(x-3)^2(x-2)(x-1)+4(-8040+(x-6)x(114509+(x-6)x(33244", True Text 320, 35, "+2367(x-6)x)))y-6(-2080+(x-6)x(61833+(x-6)x(18618+1369(x-6)x)))y^2+2(-1020", True Text 320, 50, "+(x-x(52967+(x-6)x(16497+1246(x-6)x)))y^3-3(-40+(x-6)x(4309+(x-6)x(1384+107", True Text 320, 65, "(x-6)x)))y^4+5(x-6)(x-5)(x-1)x(23+3(x-6)x)y^5))/86400<0.5", True Color 0,128,255 Text 320, 460, "https://www.niksula.hut.fi/~hkankaan/Homepages/face.html", True Line 95, 473, 545, 473 Flip st= MilliSecs() For y = 0.0 To 7.0 Step 0.045 y1 = y-1. y3 = y-3. y2 = y*y yc = y2*y y4 = yc*y y5 = y4*y For x = 0.0 To 6.0 Step 0.045 x1 = x-1. : x2 = x-2. x3 = x-3. : x4 = x-4. x5 = x-5. : x6 = x-6. t1 = 80*x5*x4*x3^2*x2*x1 t2 = x6*x t3 = 5*x6*x5*x1*x t4 = (c1+t2*(c2+t2*(c3+c4*t2))) t5 = (c5+t2*(c6+x6*x*(c7+c8*x6*x))) t6 = (c10+t2*(c11+c12*t2)) t7 = (c13+t2*(c14+107*t2)) If (y3*y1*(t1+4*t4*y-6*t5*y2+2*(c9+t2*t6)*yc-3*(-40+t2*t7)*y4+t3*(23+3*t2)*y5))/c15 < 0.5 Then DrawBlock pix, x*scalex+tx, y*scaley+ty End If Next Next Text 5,5,MilliSecs()-st Flip WaitMouse() mx = MouseX(): my = MouseY() If mx>=95 And mx<=545 And my>=460 And my<=479 Then ie\$ = "C:\Program Files\Internet Explorer\iexplore.exe " url\$ = "https://www.niksula.hut.fi/~hkankaan/Homepages/face.html" ExecFile Chr\$(34)+ie\$+Chr\$(34) + url\$ End If End -->

There are no comments for this entry. -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 648|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
 Latest PostsAny Feature Requests? Kuron Fri 23:09 More Monkey Madness - With Ducks therevillsgames Fri 20:23 Arms on Switch Jayenkai Fri 18:30 Time for a new Android Test Doohickey Jayenkai Fri 09:26 CSS-Me-Do - SoCoder2 Jayenkai Fri 06:28 Pillowcases for kids! rockford Thu 16:15 Manchester Arena Explosion Jayenkai Thu 02:04 Buy Zelda spinal Wed 11:31 Family Jayenkai Wed 04:06 RIP - Sir Roger Moore rockford Tue 15:56 More

 Latest Items Showcase : Hiveszzoom Fri 16:10 Dev-Diary : My Journey into NES Developmentrychan Thu 12:31 Showcase : FlappadiddleJayenkai Sun 14:39 Snippet : QFindJayenkai Sun 13:02 Showcase : Tiny BlocksJayenkai Sun 04:08 Showcase : Read Error Arychan Fri 05:13 Blog : All my makes!Jayenkai Tue 05:48 Showcase : Infinitronrychan Mon 18:03 Showcase : Quadobanrskgames Fri 10:11 Blog : My Arduino experience.steve_ancell Wed 17:02 Showcase : Roguelike ExplorerPakz Fri 06:59 News : Newsletter #311Jayenkai Thu 17:27 Link : Super Shapes Exploration KitAndy_A Thu 11:09 Dev-Diary : Sensitive - Arduboy!rychan Thu 17:27 Snippet : Skylinessteve_ancell Tue 14:25More

Who's Online
Kuron
Fri, at 23:09
Evil Roy Ferguson
Fri, at 20:47
therevillsgames
Fri, at 20:23
rskgames
Fri, at 19:28
Jayenkai
Fri, at 18:41
9572AD
Fri, at 18:10
steve_ancell
Fri, at 18:04
rockford
Fri, at 16:34
zzoom
Fri, at 16:14
Pakz
Fri, at 15:20
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.