Geometric Algebra, First Course, Episode 01: Vectors and Operator Overloading.

preview_player
Показать описание
We begin the Geometric Algebra in STEMCstudio series of videos by creating a Vector class and then add operator overloading so that the code syntax for addition looks like mathematics. This is an ideal introduction to the coding techniques that will enable computational modeling. Some familiarity with vectors is assumed but an in-depth knowledge is not required.

The STEMCstudio project for this episode can be found at the following link:

Рекомендации по теме
Комментарии
Автор

Geometrically, a vector is just the combination of a direction and a distance. The thing is, for any two vectors, you can represent the first in terms of the second; as the sum of the parts that are parallel and perpendicular to it. The interior (dot) product of two vectors multiplies only the parallel parts, yielding a scalar value. Because the basis vectors are unit length, this can be used to decompose any vector into an ordered pair of scalars that describe how much the vector is acting in the "x" and "y" directions. It's literally just (v·x̂, v·ŷ). But we write it as <x, y> or xx̂ + yŷ.

Also, when you see something like ℝ² being written, the key thing to note is that ℝ is a *set* and that this is actually just shortand for ℝ×ℝ. The operation forms a new set of ordered pairs with every potential combination of elements from the first and second sets. E.g. {1, 2}×{3, 4}={(1, 3), (1, 4), (2, 3), (2, 4)}. If you're a programmer, you can think of ℝ² as being sort of like a really clever way of declaring the parameter types for a function as (float, float).

bitskit
Автор

Thanks for all your hard work. Love the videos so far

ibgib
Автор

@11.02 I don't know about typescript but a string with variable substitution like that is called an interpolated string in a number of languages.

PeeterJoot
Автор

Wow! This could potentially be quite interesting. But WHAT AM I TO DO? We appear to be using something called StemCStudio. I went there. I have what amounts to be a blank screen. What do I type? How do I follow. along with the video? I am completely lost at the very beginning

normanwikner
Автор

What is this STEMCstudio software? Do they have any use for a coder with a hard science degree?

davidhand
Автор

you should place e2 at the tip of e1 as well. if you want anti-commutativity to be elementary-school-obvious: up=-down. right=-left. right up = up left = left down = down right. up up = 1. right right = 1. (it even follows from the first statement that they must square to either -1 or 1.)

rrrbb
Автор

I suspect Geometric Algebra has a lot to do with the unit circle thing of a jiggers. There is another set of Algebra that uses the unit ellipse.
Ellipse Positive Set, x^2+x*y+y^2=1, <(1/3)*sqrt(3)*cos(ϑ)-sin(ϑ),
[x/sqrt(x^2+x*y+y^2), y/sqrt(x^2+x*y+y^2)]
[(x^2-y^2)/(x^2+x*y+y^2), y*(y+2*x)/(x^2+x*y+y^2)]
[(x^3-3*x*y^2-y^3)/(x^2+x*y+y^2)^(3/2),
[(x^4-6*x^2*y^2-4*x*y^3)/(x^2+x*y+y^2)^2,
[(x^5-10*x^3*y^2-10*x^2*y^3+y^5)/(x^2+x*y+y^2)^(5/2),

Ellipse Negative Set, x^2-x*y+y^2=1, <cos(t)-(1/3)*sqrt(3)*sin(ϑ),
[x/sqrt(x^2-x*y+y^2), y/sqrt(x^2-x*y+y^2)]
[(x^2-y^2)/(x^2-x*y+y^2), y*(-y+2*x)/(x^2-x*y+y^2)]
[(x^3-3*x*y^2+y^3)/(x^2-x*y+y^2)^(3/2),
[(x^4-6*x^2*y^2+4*x*y^3)/(x^2-x*y+y^2)^2,
[(x^5-10*x^3*y^2+10*x^2*y^3-y^5)/(x^2-x*y+y^2)^(5/2),

Here is a Mandelbrot Set for you folks that you haven't seen before.
Left click zooms in, right click zooms out.

thomasolson
Автор

Something I noticed when following along (personally new to Typescript, so a decent introduction) was that `readonly` is BS. The software did report an error when trying to modify a readonly field or static, but it still allowed the modification anyways. (Also I ran into the old Javascript arch nemesis of coercion to strings when trying to add the values before putting in the operator overload. I thought that would be an aspect that Typescript would've fixed, but I guess not.)

angeldude
Автор

Thks, Dumb question: ?what's the programming language (ex: C)?
?what a good/concise/brief/etc book to learn the language?
?Oh hows abouts a good/concise/brief/etc book on geometric algebra/calclus or STEMstudio?
Call old-fashion I like still likes good/concise/brief/etc especially cozy books & coffee (with a little cream/honey pls ;)
Geometric algebra/calclus is a new discipline to me. Who is this fellow:

tombouie
Автор

Seems like you assume that the general audience is yourself.

johnnisshansen