Jump to content


Photo

Math Script Collection


  • Please log in to reply
8 replies to this topic

#1 @Alex@

@Alex@

    GMC Member

  • GMC Member
  • 4184 posts
  • Version:Unknown

Posted 16 July 2011 - 12:54 AM

MathDotN

What is MathDotN ?

MathDotN is a personal collection of scripts that deal with mathematical concepts , physics and data handling. This collection is constantly being added to whenever I need a break from my current project or when something just pops into my head.

Who created MathDotN?

I ( Alex Arthur) created most of MathDotNs content, however some scripts draw inspiration from ones previously created by others from the programming community and other are directly taken from free resource sites. These scripts specify where they come from.

What exactly is in MathDotN?

MathDotN currently contains 74 scripts. These scripts contain code that calculates simple things like the area of a circle to manipulation of vectors and matrices to using Simpsons Rule to integrate.

Where can I download MathDotN?

  • Download the scripts : Here
  • Dowload the gm81 : Here


Is there documention concerning MathDotN?

MathDotN comes with a script labelled IMPORTANT, although not strictly a manual does display all scripts in MathDotN names and arguments. The indivual scripts themselves mostly have comments explaining there use. If you would like more information or help feel free to leave a comment.



This format is stupid can I comment on that?
Yes, feel free to leave any comments you like. I will continue to add to this collection of scripts so if you have any ideas that fit the theme and I'll see what I can do.

Edited by @Alex@, 18 August 2011 - 12:36 PM.

  • 0

#2 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 18 August 2011 - 12:31 PM

please fix the link
  • 0

#3 @Alex@

@Alex@

    GMC Member

  • GMC Member
  • 4184 posts
  • Version:Unknown

Posted 18 August 2011 - 12:35 PM

Sorry I was unaware this link was down. Here is a link for you : http://www.host-a.ne...NewMathDot.gm81
  • 0

#4 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 18 August 2011 - 01:18 PM

is there a gmk version?
  • 0

#5 @Alex@

@Alex@

    GMC Member

  • GMC Member
  • 4184 posts
  • Version:Unknown

Posted 18 August 2011 - 01:34 PM

No, I'm afraid not. Since the hard-ware upgrade here I haven't used a version of gamemaker that produces gmks. You might want to download and import the scripts or use Gm8.1 lite to read the scripts and import them into your current version of GameMaker. YellowAfterlife has gm81 -> gmk convertor around that you are free to use if you want less hassle. http://gmc.yoyogames...howtopic=505903
  • 0

#6 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1819 posts
  • Version:GM:Studio

Posted 18 August 2011 - 06:49 PM

These scripts are quite inefficient.
For example,
if radtodeg(argument0) mod 90 = 0
    {
    return 0 ;
    }
    
if tan(argument0) != 0
    {
    return 1/tan(argument0) ;
    }
Is inaccurate (cotan is defined at pi/2 + pi * n) and can be replaced with the much better
var s;
s = sin(argument0);
if (s != 0)
    return cos(argument0) / s;
else
    show_error('Cotangent undefined at multiples of pi.', false);


Also, many of these scripts are of dubious usefulness.
  • 0

#7 Agamer

Agamer

    GMC Member

  • GMC Member
  • 153 posts

Posted 28 November 2011 - 05:08 PM

That's an interesting collection of scripts. However, they are quite disorganized: some don't have the argument list in the help documentation at the scripts' beginning; some don't even provide any help. Some are so simple that as inline functions they would go much faster. Some are a bit inefficient, and some are basically worthless. Nonetheless, the extensive group of ds_list functions is actually pretty useful.
For an idea of the type of scripts that can be very helpful, check out my scripts linked in my signature. (I use most of these scripts constantly)

EDIT: Oh, and one other really bad thing that you do is set local variables! This is a very bad idea, causing both unnecessary memory leaks and very potential errors. (You set arrays at certain points as well; I suggest using ds_lists instead that can be represented by one local variable and destroyed at the end)

Edited by Agamer, 28 November 2011 - 11:36 PM.

  • 0

#8 SkullSoft

SkullSoft

    GMC Member

  • GMC Member
  • 30 posts
  • Version:Unknown

Posted 01 March 2012 - 08:36 PM

Thank you, some handy stuff in there!
  • 0

#9 brac37

brac37

    GMC Member

  • GMC Member
  • 808 posts
  • Version:GM7

Posted 28 March 2012 - 09:20 PM

These scripts are quite inefficient.
For example,

if radtodeg(argument0) mod 90 = 0
    {
    return 0 ;
    }
    
if tan(argument0) != 0
    {
    return 1/tan(argument0) ;
    }
Is inaccurate (cotan is defined at pi/2 + pi * n) and can be replaced with the much better
var s;
s = sin(argument0);
if (s != 0)
    return cos(argument0) / s;
else
    show_error('Cotangent undefined at multiples of pi.', false);


Also, many of these scripts are of dubious usefulness.


return tan(0.5*pi-argument0);
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users