Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Stereographic Diagrams

Stereographic Diagrams

Stereographic Diagrams


Has anyone managed to plot a stereographic triangle with EXCEL.
I look forward to all your tips.



RE: Stereographic Diagrams

I really do not know what a stereographic triangle is but however once I tried to plot a solubility ( on z-axis as a function of two independent conncentrations( on x- and y-axis) in excel. The plot was not very impressive because of rather unprecise measurements. The z-value was shown in a projection of Carthesian coordinates system after a normalization of the input values.
There is a triangle plot of a solubility as a function of three variables though not really independent while the sum of them must be 1,0 (after a normalization) in a software package Statistica that I am using too. Maybe that would help you.

RE: Stereographic Diagrams

Do you mean the triangle graphics perhaps, like those oriented to analyze phases & concentrations, etc, or flammability problems?
If so, maybe this clarifies your post.
I'm in the same search. If I succeed with matlab or excel, I'll post here.
Have a safe day

RE: Stereographic Diagrams

Great, Joerd!
Just what I was looking for.
I've a problem with the macro; clicking on "Draw" it appears a  compilation error message about the Byref, in the subroutine:
Sub DrawCurve(XYValues As Variant)
I will see if I can do something. Maybe is related with my units definition.

RE: Stereographic Diagrams

Joerd (or anyone interested):
Your spreadsheet worked, changing the definition double by Variant at the end of the module. See changes in bold:
Function TernaryToXY(x_A As Variant, x_B As Variant) As Variant
Dim TXY(1) As Double
    TXY(0) = LLX + SideSize * (1 - x_A + x_B) / 2
    TXY(1) = LLY - SideSize * HSratio * (1 - x_A - x_B)
    TernaryToXY = TXY
End Function

I will try to improve the graph, it seems not to work correctly changing the values. Suggestions?


RE: Stereographic Diagrams

The bug apart (I know it is there simply coz you forgot to do a test-run before posting and inadvertently sent this version), your program is simply beautiful!
A fine example of graphics automation in Excel - my compliments!


RE: Stereographic Diagrams

Thanks for the compliments and feedback. This was a workbook that I did several years ago and have not looked to it for quite some time, so improvements are welcome.

Although your suggestion works, I decided to change the function header to:
Function TernaryToXY(ByVal x_A As Double, ByVal x_B As Double) As Variant

I don't know what the problem with the values would be, can you be more specific?


Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Stereographic Diagrams

Look at the values of X1 and Y1 as declared locally in the Sub DrawCurve(XYValues As Variant):

'Dim X1 As Double, Y1 As Double, X2 As Double, Y2 As Double'

now look at the values as passed to the subroutine:
XY = TernaryToXY(XYValues(i, 0), XYValues(i, 1))

'Function TernaryToXY(x_A, x_B) As Variant'

which makes XY a variant..

Now deriving two 'double' values from a variant as follows:
    X1 = XY(0)
    Y1 = XY(1)
appears to be a possible cause of the error...

Bottom line is (the way I look at it) : What works OK is the correct syntax...

Mala Singh
'Dare to Imagine'

RE: Stereographic Diagrams

The trouble with the numbers is related to the figures that appears in the Excel table.
The last six rows are not possible values, but they demonstrate that they cannot be drawn. Bright!
These rows are available for any additional data, if available, right? Good job...
I added a colored background, and it's fine.
Your spreadsheet dissapeared on the addressing, so it's lost for future interested guys.
Mala, I'll review your comments, thanks.
Have a safe day

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close