Computer Science Canada

Math Function Draw-er

Author:  beard0 [ Sun Oct 24, 2004 12:48 pm ]
Post subject:  Math Function Draw-er

This is a module I made to draw math functions with various parameters that you can set. Parameters can be set using separate functions or in a View.Set like manner of string elements separated by commas, assigning with colon, and assigning multiple values with semi-colon. A more thorough readme to be posted. There is an example at the end of module.

Author:  Delos [ Sun Oct 24, 2004 6:10 pm ]
Post subject: 

Great work beard0!! Claping

code:

fcn square (x : real) : real
    result cos (Math.PI / x)
end square
var f3 := Function.New (square, "Area:0;0;" + intstr (maxx) + ";" + intstr (maxy) +
    ",Range:5;5" +
    ",Ticks:1;1")

Function.Show (f3)


Me likes this one!

Solid module, great use of parameters. Now how about you add domain specifics for the function as well! Then compositions. And then dy/dx capabilities!

+bits

Author:  How U Doin [ Tue Oct 26, 2004 8:54 am ]
Post subject: 

Wow! 386 lines very good the most I've ever done was 134 Crying or Very sad

Im working on it though!

Author:  beard0 [ Tue Oct 26, 2004 12:27 pm ]
Post subject: 

How U Doin wrote:
Wow! 386 lines very good the most I've ever done was 134 Crying or Very sad

Im working on it though!


How U Doin: more lines doesn't necessarily mean better. In fact, the less lines that accomplish the same thing is better. Confused

Author:  Tony [ Tue Oct 26, 2004 12:36 pm ]
Post subject: 

How U Doin wrote:
most I've ever done was 134

ok... can you write pong or snake in 20 lines of code


: