in reply to Is there a Module that can handle a set of data points?

I'd go with vector calculus to approach this kind of problems.

A module would need to be able to define vectors as objects and overload operators for addition, subtraction, scalar product and vector product.

There are plenty of modules in the geometry / algebra / math / pdl namespace, not sure which to recommend, personally I might start with my own toy project to play around with overloading.

update

Salva's module looks pretty much how I'd envision it. :)

(though I might ponder about allowing 2d cross products by adding a third 0 component)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: Is there a Module that can handle a set of data points?

Replies are listed 'Best First'.
Re^2: Is there a Module that can handle a set of data points?
by perlynewby (Scribe) on Nov 13, 2015 at 11:42 UTC

    Thanks!

    I am thinking of adding a little bit more of complexity now that you mentioned it( 3 D.) I will start to play with the Math module...maybe more questions on that later. I appreciate the advice

Re^2: Is there a Module that can handle a set of data points?
by perlynewby (Scribe) on Nov 13, 2015 at 11:49 UTC

    quick question

    what's the right syntax to have only 3 decimal points for the angle calculation? $a= atan($ABx/$ACy)*(360/pi){3}

    output can be like 90.123

      That's the precise example given at the start of the sprintf documentation.