[Include] Graphic Functions! v.0.1A
#21

damn, thanks wouldn't that take a lot of textdraws just for 1 medium sized triangle?
Reply
#22

Wow, amazing include, it will be useful.

Thanks!!
Reply
#23

Thanks.
Reply
#24

hey , how can i make this

[ame]http://www.youtube.com/watch?v=A_LrO-49vB4[/ame]

pause it at 0:52.. that box like sqaure on there screen

something like this for 1 side?
pawn Код:
public GRAPHIC::Init()
{
    MY_GRAPH = GRAPHIC::Create(200.0, 250.0, -50, -50, 50, 50);
    GRAPHIC::XYAxisColor(MY_GRAPH, 0xFFFFFF55, RED);
    GRAPHIC::UseBackground(MY_GRAPH, 0);

    for(new g = 0; g < 25; g ++)
    {
        GRAPHIC::AddPoint(MY_GRAPH, 50,  0 + g, 0x00FF00FF);
    }
    return 1;
}
but how would i make perfect curves
Reply
#25

@Donya:

*Sorry for the late reply but I'm currently very busy in my daily routine, every day.

pawn Код:
stock
    rasterCircle(x0, y0, radius)
{
  new
    f = 1 - radius,
    ddF_x = 1,
    ddF_y = -2 * radius,
    x = 0,
    y = radius;

    GRAPHIC::AddPoint(MY_GRAPH, x0, y0 + radius, 0x00FF00FF);
    GRAPHIC::AddPoint(MY_GRAPH, x0, y0 - radius, 0x00FF00FF);
    GRAPHIC::AddPoint(MY_GRAPH, x0 + radius, y0, 0x00FF00FF);
    GRAPHIC::AddPoint(MY_GRAPH, x0 - radius, y0, 0x00FF00FF);

    while(x < y)
    {
        if(f >= 0)
        {
            y--;
            ddF_y += 2;
            f += ddF_y;
        }
        x++;
        ddF_x += 2;
        f += ddF_x;
       
        GRAPHIC::AddPoint(MY_GRAPH, x0 + x, y0 + y, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 - x, y0 + y, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 + x, y0 - y, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 - x, y0 - y, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 + y, y0 + x, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 - y, y0 + x, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 + y, y0 - x, 0x00FF00FF);
        GRAPHIC::AddPoint(MY_GRAPH, x0 - y, y0 - x, 0x00FF00FF);
    }
}
This is a full-circle implementation literally taken from wikipedia: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm

It's not fully perfect but I'm going to work on that. ; )
Also "playing" with rasterCircle function will probably make you figure out how to create geometric figures like a 90є (pi/2 rad.) rotated square.
Reply
#26

This is damn impressive! Nice work
Reply
#27

Quote:
Originally Posted by Jay_
Посмотреть сообщение
This is damn impressive! Nice work
Thanks, man! ( :
Reply
#28

Thank u
Reply
#29

what is this point ? can someone explain
Reply
#30

Thats, awesome im thinking of using this for something great coming up, thanks man, much appreciated for the release.
Reply
#31

If you read the topic carefully enough, you'd know it is an example code and not the actual script. Don't be condescending if you don't even know what you are talking about.
Reply
#32

Anyone have the picture of what it can do and the actual script?
Reply
#33

photos plsssssssss
Reply
#34

Quote:
Originally Posted by Kar
Посмотреть сообщение
Anyone have the picture of what it can do and the actual script?
It is used to make graphs (x/y graphs).
Reply
#35

Who can reupload the download link? Very want to get it!
Reply
#36

Anyone got this script? It would be nice if someone posts.
Reply
#37

Yeah i want the link too
Reply
#38

https://github.com/karimcambridge/SA-MP-graphfunc
Reply
#39

I've added the example screenshot back.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)