A #RosettaCode contribution for #ATS -- the old insideness of a convex hull algorithm. I decided to do this because I am likely to stick the algorithm within my next BΓ©zier intersection algorithm (which will be coded in Ada using homogeneous geometric algebra, not in ATS using euclidean, but whatever) --

Find if a point is within a triangle - Rosetta Code https://rosettacode.org/wiki/Find_if_a_point_is_within_a_triangle#ATS

#ATSlang #Mathematics #Geometry

Find if a point is within a triangle

Rosetta Code

Have at it, #fonts nerds and #graphics weirdos! A #RosettaCode task for y’all:

BΓ©zier curves/Intersections - Rosetta Code https://rosettacode.org/wiki/B%C3%A9zier_curves/Intersections

#ATS #ATSlang #Dlang #Maxima

BΓ©zier curves/Intersections

You are given two planar quadratic BΓ©zier curves, having control points ( βˆ’ 1 , 0 ) ,...

Rosetta Code
Simulated optics experiment/Data analysis

.

Rosetta Code

There is a new #ATS example at #RosettaCode, part of my nascent tendentious series of simulations that show quantum physicists are entirely wrong in some of their beliefs:

https://rosettacode.org/wiki/Simulated_optics_experiment/Simulator

This #ATSlang code is all or mostly free of the proofs and complicated call by reference you often see in my ATS code. You could translate it straight into OCaml or SML. It is a simulation, supposedly impossible, of experiments you sometimes see hyped in the news, but which are stupid.

Simulated optics experiment/Simulator

.

Rosetta Code

I have added #ObjectIcon and #ATS --
https://rosettacode.org/wiki/Bernstein_basis_polynomials#ATS

#ATSlang #FunctionalProgramming

Addendum: Others have been adding examples, too, so far in languages with which I am unfamiliar.

Bernstein basis polynomials

The n + 1 {\displaystyle n + 1} Bernstein basis polynomials of degree n...

Rosetta Code

Some #RealTime #ObjectOriented programming in #ATS for #RosettaCode. And I mean really #OO, not type hierarchy masquerading as OO. Communicating objects.

There is no type hierarchy, because none is needed. One can use a closure to connect two objects, as long as the connection is compatible at both ends.

And there is just one thread, because why in heck would you need two threads, just to read the time on the clock??????

https://rosettacode.org/wiki/Active_object#ATS

#ATSlang

Active object

In object-oriented programming an object is active when its state depends on clock. Usually an active object encapsulates a task that updates the object's state...

Rosetta Code

Another #ATS example for #RosettaCode fans!

https://rosettacode.org/wiki/Long_multiplication#ATS

This is long multiplication, which I have used here to solve two distinct problems.

The designer of the task must never have realized you could do this in something other than BCD and end up not having a carry ever occur.

#ATSlang #FunctionalProgramming

I added #ATS to the #RosettaCode for Adaptive Simpson Quadrature: https://rosettacode.org/wiki/Numerical_integration/Adaptive_Simpson's_method#ATS

I also made some revisions to the text of the draft task.

#ATSlang #NumericalMethods

Numerical integration/Adaptive Simpson's method

Lyness's (1969) Modified Adaptive Simpson's method (doi:10.1145/321526.321537) is a numerical quadrature method that recursively bisects the interval until the precision...

Rosetta Code