Re: Graphic Functions! v.0.1A -
Donya - 08.05.2011
damn, thanks wouldn't that take a lot of textdraws just for 1 medium sized triangle?
Respuesta: Graphic Functions! v.0.1A -
Code8976Man - 08.05.2011
Wow, amazing include, it will be useful.
Thanks!!
Re: Graphic Functions! v.0.1A -
pmkrz - 09.05.2011
Thanks.
Re: Graphic Functions! v.0.1A -
Donya - 15.05.2011
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
Re: Graphic Functions! v.0.1A -
pmkrz - 20.05.2011
@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.
Re: Graphic Functions! v.0.1A -
Jay_ - 20.05.2011
This is damn impressive! Nice work
Re: Graphic Functions! v.0.1A -
pmkrz - 20.05.2011
Quote:
Originally Posted by Jay_
This is damn impressive! Nice work
|
Thanks, man! ( :
Re: Graphic Functions! v.0.1A -
BlackG - 20.05.2011
Thank u
Re: Graphic Functions! v.0.1A -
titanak - 21.05.2011
what is this point ? can someone explain
Re: Graphic Functions! v.0.1A -
Ricop522 - 10.07.2011
Thats, awesome im thinking of using this for something great coming up, thanks man, much appreciated for the release.
Re: Graphic Functions! v.0.1A -
Reynolds - 13.07.2014
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.
Re: Graphic Functions! v.0.1A -
Kar - 13.07.2014
Anyone have the picture of what it can do and the actual script?
Re: Graphic Functions! v.0.1A -
ScripteRNaBEEL - 13.07.2014
photos plsssssssss
Re: Graphic Functions! v.0.1A -
Reynolds - 14.07.2014
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).
Re: Graphic Functions! v.0.1A -
GreenS - 06.09.2014
Who can reupload the download link? Very want to get it!
Re: Graphic Functions! v.0.1A -
Fernado Samuel - 06.09.2014
Anyone got this script? It would be nice if someone posts.
Re: Graphic Functions! v.0.1A -
Rudy_ - 02.10.2014
Yeah i want the link too
Re: Graphic Functions! v.0.1A -
Kar - 13.04.2015
https://github.com/karimcambridge/SA-MP-graphfunc
Re: Graphic Functions! v.0.1A -
Kar - 12.12.2017
I've added the example screenshot back.