Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graphic Design (https://forums.graalonline.com/forums/forumdisplay.php?f=9)
-   -   Anti Aliasing Equation (https://forums.graalonline.com/forums/showthread.php?t=57214)

Goboom 01-21-2005 11:03 PM

Anti Aliasing Equation
 
Does anyone know what this equation is!?
I need it for a paint program I am writing which still needs a name by the way! :)

LordZen 01-22-2005 01:47 AM

If you understand the concept, I'm sure you could make your own equation in your program's code.

I never had a need to have perfect AAing, so I have never paid attention to exact RGB values. But, I guess you just take the average of the RGB values (each seperately) for a 3x3 grid of pixels, to decide what goes in the center? I dunno lol.

But its a simple concept, if (0,0,0) is black, and (255,255,255) is white, and your only dealing with those 2 colors. You would take the average of each RGB seperately (255/2,255/2,255/2) which would be (127.5,127.5,127.5). Of course I guess you gotta round that to 128,128,128 but that value is the exact gray you should use if AAing between pitch black and pure white.

Kaimetsu 01-22-2005 07:44 AM

Depends on the type of antialiasing.

WanDaMan 01-22-2005 10:48 AM

Dusty did a tutorial on anti-aliasing, why not look it up? :)

Zero Hour 01-22-2005 05:48 PM

A tutorial about how to anti-alias, and the equation to make a program do it are two very different things. Goboom is looking for the latter.

Goboom 01-23-2005 12:25 AM

Here are icons, all icon updates will be posted in this post! :)
Pencil: http://img36.exs.cx/img36/6703/pencil3rh.png
Zoom Tool: http://img36.exs.cx/img36/3094/magnify9ig.png
Paint Brush: http://img151.exs.cx/img151/6871/brush8sh.png
Eye Dropper (Color Picker): http://img138.exs.cx/img138/2738/dropper7qz.png
Eraser(s):http://img31.exs.cx/img31/4946/eraser18xv.png or http://img31.exs.cx/img31/2558/eraser29ny.png (I can't decide which one I like.)
Text: http://img129.exs.cx/img129/2716/text4up.png
Paint Bucket: http://img164.exs.cx/img164/852/paintbucket4ik.png
Spray Can: http://img198.exs.cx/img198/1038/spraycan6yw.png
Swirly Select: http://img165.exs.cx/img165/5837/swirlyselect3hs.png
Square Select: http://img165.exs.cx/img165/6426/squareselect6uh.png
Line: http://img165.exs.cx/img165/8469/line2jw.png
Curve Line: http://img165.exs.cx/img165/3248/curveline9st.png
Rectangle: http://img165.exs.cx/img165/6230/square3na.png
Curved Rectangle: http://img182.exs.cx/img182/7479/curvedrectangle1kk.png
Circle: http://img182.exs.cx/img182/1589/circle7ja.png
Polygon http://img185.exs.cx/img185/1964/polygon0bm.png

TELL ME WHAT YOU THINK! :)

WanDaMan 01-23-2005 12:30 AM

I like the Zoom and Paint icons, but the pencil kinda freaks me out >_<

Blitz_Hunter 01-23-2005 12:33 AM

The lead on the pencil looks like it's gonna break when you start to write with it. :eek:

Butz 01-23-2005 01:16 AM

I like the second eraser more than the first.

LogicBot 01-23-2005 02:03 AM

Quote:

Originally Posted by Butz
I like the second eraser more than the first.

I say the first.

Galdor 01-23-2005 04:27 AM

Quote:

Originally Posted by LogicBot
I say the first.

I say the second one.

Blitz_Hunter 01-23-2005 04:43 AM

I like the second one. Though normal erasers aren't usually hot pinkish.. >_<

smurfmidgetninja 01-23-2005 04:54 AM

I say the second one also...

@Blitz_Hunter....the ones like that are...even the ones on pencils are...they are usually hot pink or white...at least here where I live.

WanDaMan 01-23-2005 12:43 PM

Cool! they all look nice :D

Good job :cool:

Snakeandy7 01-23-2005 02:08 PM

I like them all, 2nd eraser though

zell12 01-24-2005 07:15 AM

Make a white eraser. Pink is icky. :p

Polo 01-24-2005 07:52 AM

2 Attachment(s)
Quote:

Originally Posted by Goboom
Does anyone know what this equation is!?
I need it for a paint program I am writing which still needs a name by the way! :)

I develop an open source graphics program, and the 2 main methods for aliasing we use are...

1) A blur grib of {0,1,0},{1,4,1},{0,1,0}. What this means is for each pixel, we take 4 times its current value, and 1 times the value of those directly adjacent. We then divide this value by 8 in order to scale it back down.

2) When applying a matrix or such to the image (for rotation, scaling/resizing and trippy effects), whe use the inverse matrix to see where the pixel 'came from' (applaying a matrix using the inverse is much better as you dont get 'gaps'). So like for each pixel on the out put, we see where its colour must have come from. Ususally this will not fall on an exact pixels, so we take a proportionate ammount from the 4 with which it is nearest. We calculate our proportions by the following method.... imageine the four nearest pixels as the corners of a square. now where you inverse matrix falls, draw a cross so that the square is split into 4 regions. We now use the area of the region which is diagonally opposite each corner to decide the weighting. I have attached a diagram to try and make this clearer, and attached an image of what this looks like in effect.

I dont know if these are official methods but they give the effect we needed sooo....

Crono 01-24-2005 06:29 PM

2nd eraser, nice gfx :D

GoZelda 01-24-2005 07:43 PM

Get some new function please. Nice GFX though.

teshy2 01-24-2005 08:09 PM

Second ereaser, and keep the color.


All times are GMT +2. The time now is 10:27 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.