Jump to content
Sign in to follow this  

Graphic Formula control

Recommended Posts

Thanks to imbatmo for the idea with his Plotting Tool

I was bored, and decided to recreate this UDF style. Here is a example, and I have added the UDF (Graph.au3) as an attachment.There's a few bugs now, but I really don't feel like bug-fixing, so go ahead and pick this up.

#include <GUIConstants.au3>
#include <Graph.au3>

$pi = 3.1415926535897932384626433832795

GUICreate("Manadar's Plotting Example",400,400)

$Plot = _GraphCreate(5,5,390,390)

_GraphSetBound($Plot, -2,2,-2*$pi,2*$pi) ; Boundaries are bugged if you take a positive value as minimum bound, or when you don't take -n as minimum and +n as maximum.

$Formula1 = _GraphCreateFormula($Plot,"Sin(x)")
$Formula2 = _GraphCreateFormula($Plot,"Cos(x)")
$Formula3 = _GraphCreateFormula($Plot,"Tan(x)")


_GraphDrawFormula($Plot,$Formula1,50) ; Draws the formula with a delay of 50 ms between each pixel. Normal speed imo.
_GraphDrawFormula($Plot,$Formula2,25) ; Draws the formula twice as fast as the last one.
_GraphDrawFormula($Plot,$Formula3) ; Draws the formula instantly.

;_GraphClear($Plot) ;_GraphClear is bugged because it doesn't make a white background.

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSe


Edited by Manadar

Share this post

Link to post
Share on other sites

This is a magnificient piece of art, i love this , now this is what i call a true program its one of the best program i ve seen through out the whole forum . nice job keep it up

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...