Program to tick solution in graph
Program to tick solution in graph
(OP)
Hi
I would like mark solution on graph for some function, for example I have 6 function and I want to hatch the common area:
f1(x)>=...
f2(x)>=...
f3(x)>=...
f4(x)>=...
f5(x)>=...
f6(x)<=...
Have you any idea how can I do that?
I would like mark solution on graph for some function, for example I have 6 function and I want to hatch the common area:
f1(x)>=...
f2(x)>=...
f3(x)>=...
f4(x)>=...
f5(x)>=...
f6(x)<=...
Have you any idea how can I do that?





RE: Program to tick solution in graph
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: Program to tick solution in graph
I'm sorry for my english, it isn't my first language
RE: Program to tick solution in graph
It would have been a good idea to state, which flavor of the program you use - that is either real Mathcad or just Prime.
The author of those outstanding "Amazing Images..", Prof. Byrge Birkeland, has also posted routines to hatch the area between to curves.
For MC15: http://communities.ptc.com/docs/DOC-3380
For Prime:http://communities.ptc.com/docs/DOC-3495
In the good old Mathsoft times there used to be a good repository of utility files but PTC has broken that as they did with so many other things. Sometimes we are lucky to find those old goodies using the wayback machine:
http://web.archive.org/web/20070730162532/http://www.mathcad.com/support/item/examples/02oct/user.mcd
You may find other routines in the PTC forum as this subject comes up ever so often and was discussed a couple of times. But the best you could find are routines to hatch the area between just two curves. For your problem you will have to deal with the various points of intersection yourself and keep track between which two curves you have to hatch for which interval and also dealing with the case that there is no common area at all.
RE: Program to tick solution in graph
Finding common area between two curves is simpler because we know that one of them is at up and another is at down, with 6 functions is bigger problem.
I'm sorry for my english, it isn't my first language
RE: Program to tick solution in graph
Take a simple triangle ABC for instance. AB=c being horizontal, A to the left, C being above c. You may think its clear where the "inside" or common area is but you would have to define it. In our case you could create an oriented path ABC, counterclockwise and define the the "inner side" is the direction of the normal vector which we get when we turn the tangent vector counter clockwise, considering the oriented path ABC.
You may also define an "inside" orientation for each function: Inside is to the right (clockwise normal vector) of a and b (if we go from left to right) and to the left of c. But then, why the change in orientation of c? This will be different if the position of the triangle changes.
Another approach can be using boolean expressions which comes especially natural for a task like linear optimization.
Once you have defined what common area means it should not be that difficult to write a routine which determines and hatches it automatically, but I guess you will have to deal with a lot of special cases.
Anyway, concerning the hatching, the provided links should get you up an running.
Good luck and Merry Christmas!