Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Hello! I have an equation (sphere and cubic Bézier curve intersection points): B(t) ⋅ B(t) = r², where dot means vector dot product. B(t) is a cubic Bézier curve: B(t) = (1 − t)³ ⋅ P0 + 3t ⋅ (1 − t)² ⋅ P1 + 3t² ⋅ (1 − t) ⋅ P2 + t³ ⋅ P3, 0 ≤ t ≤ 1 P0, P1, P2, P3 are some known points, к is some known value too. Is it possible to solve this using SMath while keeping constants as letters? Edited by user 15 September 2021 17:51:55(UTC)
| Reason: Not specified
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Please attach your Smath document. Bézier/Hermite ... lot in Smath. Cheers ... Jean.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Originally Posted by: Jean Giraud Please attach your Smath document. Bézier/Hermite ... lot in Smath. Cheers ... Jean. https://ru.smath.com/cloud/sheet/ao2a4mLPSzWell, not much in there, I don't know how to write the equation in it. I am new to SMath, and used only MathCAD a few times, like, 13-14 years ago...
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Originally Posted by: Necronomicron Originally Posted by: Jean Giraud Please attach your Smath document. Bézier/Hermite ... lot in Smath. Cheers ... Jean. https://ru.smath.com/cloud/sheet/ao2a4mLPSzWell, not much in there, I don't know how to write the equation in it. I am new to SMath, and used only MathCAD a few times, like, 13-14 years ago... "Error. There is no Worksheet found." Please upload your sm file to any cloud service a share the link Regards, Oscar
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Originally Posted by: Necronomicron You must use Symbolic evaluation to solve your equation, additionally, you can use some plugin for this task (in my case I used the Maxima plugin). Please see attached file: Sphere and Cubic.sm (216kb) downloaded 19 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,125 Was thanked: 506 time(s) in 337 post(s)
|
All those kind of symbolic solvings require either Maxima or Maple plugin as far as I know. Every other smath solvers [solve(), roots(), FindRoot(), al_nleqsolve(), etc] are numerical solvers. Could someone correct this statement if it is not true? Regards Edited by user 15 September 2021 20:42:03(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Originally Posted by: overlord All those kind of symbolic solvings require either Maxima or Maple plugin as far as I know. Every other smath solvers [solve(), Roots(), al_nleqsolve(), etc] are numerical solvers. Could someone correct this statement if it is not true?
Regards yes, that's correct, you can check the description of solve(), roots(), al_nleqsolve(), etc on the Interactive SMath Handbook
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. In the attached how to solve the problem numerically. Notice that B(t) must to be defined using vectorize, because SMath don't expand the scalar by vector products. Sphere and Cubic.sm (9kb) downloaded 6 time(s).Best regards. Alvaro.
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Originally Posted by: oscampo Originally Posted by: Necronomicron You must use Symbolic evaluation to solve your equation, additionally, you can use some plugin for this task (in my case I used the Maxima plugin). Please see attached file: Sphere and Cubic.sm (216kb) downloaded 19 time(s). There is missing «²» after second parentheses in your file. And I downloaded SMath and Maxima, but when I open your file, I get an error: «Cannot find maxima.bat». Sphere and cubic Bezier curve intersection points.sm (4kb) downloaded 5 time(s).Edited by user 16 September 2021 12:50:55(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Originally Posted by: Necronomicron Please refer to Maxima plugin instructions, you can find here
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Originally Posted by: oscampo Originally Posted by: Necronomicron Please refer to Maxima plugin instructions, you can find here OK, I've fixed the error, but now it says: «r is undefined». Sorry, it's really hard to understand what to do and I can't find any proper docs about it... Sphere and cubic Bezier curve intersection points.sm (5kb) downloaded 3 time(s).
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Originally Posted by: Necronomicron There is a missing "*"
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Thank you! But what should I do with «r is undefined»? 🤔
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 238 Location: Cali, Colombia Was thanked: 79 time(s) in 60 post(s)
|
Are you sure you are using the option "Symbolic Optimization"?
You must right-click over your equation, then choose Optimization-Symbolic
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/09/2021(UTC) Posts: 8
|
Originally Posted by: oscampo Are you sure you are using the option "Symbolic Optimization"?
You must right-click over your equation, then choose Optimization-Symbolic Thank you very much! It worked! However, the roots are so long... Not sure I can use them... Thanks anyway! 😊
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. Notice that P0, ..., P3 are vectors with 3 components, not scalars. You can't get the distance with B(t).B(t) using P's as scalars.
Best regards. Alvaro.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: Necronomicron I have an equation (sphere and cubic Bézier curve intersection points): Didn't see the sphere ? Bézier is a 2 D plot I don't understand your project, will leave. You can project Bézier as surface plot on the sphere, at this point, all 'N' are roots. Enjoy/ignore ... Jean. Page6 Bezier.sm (31kb) downloaded 5 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,125 Was thanked: 506 time(s) in 337 post(s)
|
Originally Posted by: Jean Giraud Didn't see the sphere ? Bézier is a 2 D plot I don't understand your project, will leave. You can project Bézier as surface plot on the sphere, at this point, all 'N' are roots. Enjoy/ignore ... Jean.
Not related with topic. Nice example to Bezier however no relation with question. Seeing Bezier in question doesn't mean you can search your files and post your first match Bezier example.
|
1 user thanked overlord for this useful post.
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.