Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
This sheet first plots a series of x,y,z data points for a floor elevation survey. surface is plotted as raw data
Then it does a surface regression analysis and generates a polynomial the poly surface is plotted.
I need to determine the curvature and then radius of curvature for any and all points. I will use an overlay of distress to determine the radius of curvature that causes distress, I currently have a slice method of raw date and of the surface but this is cumbersome.
A math prof colleague provided a solution that runs OK on his old version of Maple.
I'm attempting to get this solution using MCAD 15 but getting errors. I think it may be a simple deal but don't know.
Can anyone help?
I've placed a number of markers in this sheet in Bold large font red text..
Solution starts on page 9. There's hand written solution at top right of page 1 and repeated lower.
BTW this is a problem I've been work on for a number of years trying various strategies. I think this is the best one.
Thanks in advance of any help or suggestions
jmc
Hi, John.
I've just had a quick skim through your worksheet. Wow, that's a lot of work, and it would take me a long time to get to grips with it.
However, I think I might have spotted the cause of your unexpected nested vector of 49x1 vectors:
Vectorization only applies to the vectors it sees in the variables/explicity defined matrices. It does not apply to the results of an expression that uses those vectorized variables. Hence, the behaviour you see in the clip above.
Stuart
PS. Edited to add that I used Mathcad Prime 10 to view your M15 worksheet.
Are you sure that L.xx(1,2) should be a vector but g.xy(1,2) is just a scalar?
I guess L.xx(1,2) should be a scalar, too. Otherwise it would be wrong to call an expression which contains L.xx using vectorization.
Its a good idea to test functions which expect scalar arguments if the result is as expected before you call them vectorized with vector arguments.
According the cross product I am a little bit confused what it should denote. As far as I know a cross product of two vectors is only defined for 3 and for 7 dimensions!
Thanks for all the help
I found some errors and I responded to emails and am replying here.
My latest edits are in the attached file along with my questions.
The issue is computing the unit vector n correctly.
I've included a section of the derivation from my math colleague.
I made an attempt but its still incorrect.
Thanks in advance for any help
jmc
Can't comment on the vector n
You promised a working Prime 11 worksheet which you did not attach - guess you meant Mathcad 11 as Prime 11 does not yet exist in public use 😉
And if its a Mathcad 11 sheet, you should be able to open it in Mathcad 15 (or 14) and use it !?
Just a comment on the polynomial fit of your data. I don't understand why the data is rounded down to 0 decimals before doing the polynomial fit.
Furthermore the coefficients for the polynomial fit could also be calculated by using polyfitc, the function defined via polyfit.
There seems to be no need for the spline interpolation.
But then, I have not looked in full detail in your sheet, so I may be wrong, indeed.
Mcad ts supplier an off done in 11.
Sorry, I don't understand.
I’ll post the pdf.
I understood that you have a working Mathcad or Prime worksheet which would be more valuable than a pdf.
Still waiting for an explanation what this vector n should denote.
As already written, a cross product is only defined for vectors in exactly three or seven dimensions.
It would make sense if n should be a normal vector of the surface, but then it would not be constant but rather depends on x and y
@john_clark wrote:
Never know when autocorrect will strike 🤪😵💫😠PTC TS supplied a pdf file done in prime 11.I attempted to replicate in prime 10 but did not work.I’ve asked TS for a live file.
jmc
OK ....?
I can imagine that tech support converted your Mathcad 15 sheet (which you posted here) into Prime format and I also can image that they already use a beta version of Prime 11 (which would mean that we would not be able to open it with Prime 10).
But I hardly can imagine that they fixed the problem with the incorrect results you complain about - did they really?
If so, even the pdf could be interesting.
Not sure if you have noticed it - in your reply to Stuart here
Re: Curvature of a surface MCAD 15 M050 - PTC Community
you wrote "Here’s a prime 11 copy that works" but probably you forgot to attach the file!
I sent a prime 10 file to them since they will no longer support 15
I’m hoping to get 15 to work since it has a much better plotting routine
I was hoping g Prime 11 would be fully compatible but was recently informed by DP of TS that that would not happen.
Still need help with unit vector if anyone has any ideas.
Thanks, in advance.
jmc
Still confused and wondering why you don't post the pdf file !??
As I already had written here Re: Curvature of a surface MCAD 15 M050 - PTC Community, your normal vector should be a function in x and y and not a constant as you tried it to define.
So you should use what you have written here
but without the equal sign at the end and with n'(x0',y0):= at the left hand side. Its a function, not a constant.
I also wonder why you call the first function argument x.0' and the second only y.0.
Looks quite strange to me, but then the name of the formal arguments of a function do not matter at all.
Being lazy I would simply use
Keep in mind that x and y here have nothing to do with the vectors defined earlier - they are just the formal function arguments.
You may equally use a and b or any other names here.
The same applies to the other functions like
I would define them without vectorization and apply vectorization only when you call the function with vectors as arguments.
BTW, is there any reason why you named the first partial derivative of f wrt x x'.0 and not simply f.x ? I found the sheet much harder to read with names like that.
Furthermore I am confused about what L.xx etc, should be
You write as an explanation
which would mean that L.xx is a scalar, but when you define L.xx you additionally multiply it with vector n, which of course makes L.xx a 3x1 vector, which I guess it should not be. Especially as you later define a matrix L(x,y) with L.xx etc. as its arguments. What you define in Mathcad as L(x,y) seems to have nothng to do with the determinant of the expression shown to the left of it, nor with what is shown in the picture to the right of it as your definition uses the first derivatives and not the second ones.
I guess you misinterpreted this handwritten formula
Here X is a vector (x,y,f(x,y)^T and a second derivate (no matter wrt which variable) means you get (0, 0, f.xi,xj)). Scalar multiplication by unit vector n simply results in f.xi,xj / sqrt(....).
So it should be that way:
Similar
and then
Enjoy simple, not nested result vectors and real result for the quadratic equation
Conclusion: Once you have your function f(x,y) forget about the data vectors X, Y or x' and y' and set up your calculations as functions in simple scalar arguments x and y. Only when you need the results for your vectors call those function (vectorized) with the data vectors as their arguments.
Hope this helps!
Thank you for your detailed response.
I confess I'm out of my depth.
My math prof colleague provided the handwritten derivation. Ann transcription errors are my own.
The use of primes was me being lazy from previous versions. This is a problem I've been dabbling with for years. Finally concluded that the curvature of a surface was the way to go. Had no idea it was this complex.
I plan to rewrite the sheet to clean it up. I'm like the guy who can drive a car attempting to fly a jet plane with little experience but willing to try anything once.
Anyway, since I'm just parroting what the prof directed, I probably don't fully understand your detailed comments.
I'll attempt to decipher your comments. Can you post the file that has your solution?
Thanks again
jmc
Can you post the file that has your solution?
The file was attached to my previous answer from the very start and still is 😉
Its named WE_20240923_Surface Curvature
Convert to Prime 10 from Werner_E's sheet.
Hi @john_clark,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag