## Solving 3 equations

Started by mogn, March 27, 2012, 11:07:50 am

#### mogn

##### March 27, 2012, 11:07:50 am
Why do you want to solve 3 equations with 3 unknowns?
Because programming in tg2 is fun.
And because I have the need to use it in a curve (profile) tool.

The equations:

1*a + 2*b + 3*c = 14
2*a + 3*b + 1*c = 11
3*a + 2*b + 1*c = 10

has the solutions a=1 b=2 c=3.

I have tested my solver with the about equations.
Note the way to inspect numerical values, using the displacement input of a surface layer
and viewing the surface layer in a new window.

#### RichTwo

##### March 28, 2012, 12:34:43 pm #1
Probably the lack of response here so far is due to our not knowing exactly what this set-up does.   Though I somehow have the feeling it is sheer brilliance at work.  Perhaps you could show a rendered image and / or show it connected to a node network so we have an idea?
You don't need a weatherman to know which way the wind blows...

#### N810

##### March 28, 2012, 02:41:45 pm #2
Soooooo...

Waht does it do/what is it used for, exactly
Hmmm... wonder what this button does....

#### mogn

##### March 30, 2012, 07:04:01 am #3
It was meant to force a 6 order Bezier curve through known points [0, 0] [1/6, 0]  [1/3, A] [1/2, B] [2/3, C] [5/6, 1] [1, 1] by solving 3 equations
giving the unknowns a, b and c, which are then put as middle points in the Bezier spline equation.

#### cyphyr

##### March 30, 2012, 07:49:52 am #4
This sure is great and at a level well beyond my understanding. You say your using this as a profile tool. Do you mean for carving valleys?
So would this be used as a blend shader ?
Cheers
Richard
www.richardfraser.co.uk
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

#### Hetzen

##### March 30, 2012, 03:37:22 pm #5
I didn't get this at first, until Mogn's second post. Here's a link I found illustrating what he's created. Scroll to "Constructing Bézier curves" in this link...

http://en.wikipedia.org/wiki/B%C3%A9zier_curve

Mogn, do you know of a program you can visualy design these curves to give you your values for this function set?

Yes I think you could use this for creating specific curves that can be driven through altitude, position, ramps to carve valleys Richard.