-
July 8th, 2014, 07:53 AM
#1
Symbolic transformations
Which is method to symbolic transformations of equations?
For example: I must find equation of line passing through two points (x0,y0) and (x1,y) in form Ax + By + C = 0
this equation is (y-y0)*(x1-x0) = (x-x0)*(y1-y0)
algorithm must change it to (y1-y0)x + (x0-x1)y + y0(x1-x0) + x0(y0-y1)
-
July 8th, 2014, 12:42 PM
#2
Re: Symbolic transformations
To convert your eqn 1 to eqn 2 is simply a matter of basic algebraic manipulation which can be done on paper in a couple of lines. So the method is just using algebraic manipulation.
Note that your eqn 2 can be further simplified to
Code:
x(y1 - y0) + y(x0 -x1) + (x1y0 - x0y1) = 0
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 8th, 2014, 02:48 PM
#3
Re: Symbolic transformations
Algebraic programs prefers Lisp. If is possible code it with Java?
-
July 8th, 2014, 03:49 PM
#4
Re: Symbolic transformations
Originally Posted by Borneq
Algebraic programs prefers Lisp. If is possible code it with Java?
Code what?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 18th, 2014, 03:09 PM
#5
Re: Symbolic transformations
Originally Posted by Borneq
Which is method to symbolic transformations of equations?
The method is simple in principle.
You build a tree representing the equations. Then you transform the tree to conform to your wanted representation of the equations.
Usually the transformations are a set of replacement rules. Each such rule consists of a pattern and what that pattern is supposed to be replace by when the pattern is identified in the tree. It's a language really.
The set of rule patterns are let loose on the tree and the tree becomes modified accordingly until no pattern applies anymore. Then the tree has reached it's fully transformed state and if the transformation language was well designed the equations are now in the form you expected.
This is for example how compilers transform expressions in the optimization phase.
Last edited by razzle; July 18th, 2014 at 04:35 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|