Solving an eqaution

Solving an eqaution - Poruke

#1 Objavljeno: 15. 9. 2021. 10:22:58
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

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?
#2 Objavljeno: 15. 9. 2021. 11:08:25
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Please attach your Smath document.
Bézier/Hermite ... lot in Smath.
Cheers ... Jean.
#3 Objavljeno: 15. 9. 2021. 11:49:13
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Wrote

Please attach your Smath document.
Bézier/Hermite ... lot in Smath.
Cheers ... Jean.



https://ru.smath.com/cloud/sheet/ao2a4mLPSz
Well, 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...
#4 Objavljeno: 15. 9. 2021. 12:19:37
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Wrote

Wrote

Please attach your Smath document.
Bézier/Hermite ... lot in Smath.
Cheers ... Jean.



https://ru.smath.com/cloud/sheet/ao2a4mLPSz
Well, 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

#5 Objavljeno: 15. 9. 2021. 12:24:03
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Sphere and cubic Bezier curve intersection points.sm (10,28 KiB) preuzeto 1290 put(ova).
Wrote

Wrote

Wrote

Please attach your Smath document.
Bézier/Hermite ... lot in Smath.
Cheers ... Jean.



https://ru.smath.com/cloud/sheet/ao2a4mLPSz
Well, 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



Sphere and cubic Bezier curve intersection points.sm (10,28 KiB) preuzeto 1290 put(ova).
#6 Objavljeno: 15. 9. 2021. 13:00:26
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Wrote

Please attach your Smath document.

Sphere and cubic Bezier curve intersection points.sm (10,28 KiB) preuzeto 1290 put(ova).



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 (215,02 KiB) preuzeto 1283 put(ova).

#7 Objavljeno: 15. 9. 2021. 14:21:28
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

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
#8 Objavljeno: 15. 9. 2021. 14:33:35
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Wrote

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
#9 Objavljeno: 15. 9. 2021. 20:57:18
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

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 (8,86 KiB) preuzeto 1231 put(ova).
Clipboard01.jpg

Best regards.
Alvaro.
1 korisnika je svidelo ovu objavu
Oscar Campo 15. 9. 2021. 21:07:00
#10 Objavljeno: 16. 9. 2021. 06:43:49
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Wrote

Wrote

Please attach your Smath document.

Sphere and cubic Bezier curve intersection points.sm (10,28 KiB) preuzeto 1290 put(ova).



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 (215,02 KiB) preuzeto 1283 put(ova).



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 (3,77 KiB) preuzeto 1320 put(ova).
#11 Objavljeno: 16. 9. 2021. 07:33:52
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Wrote



...

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 (3,77 KiB) preuzeto 1320 put(ova).



Please refer to Maxima plugin instructions, you can find here
#12 Objavljeno: 16. 9. 2021. 08:18:04
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Wrote

Wrote



...

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 (3,77 KiB) preuzeto 1320 put(ova).



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 (4,62 KiB) preuzeto 1287 put(ova).
#13 Objavljeno: 16. 9. 2021. 08:43:30
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

I really don't get what's wrong now...

Sphere and cubic Bezier curve intersection points.sm (12,04 KiB) preuzeto 1320 put(ova).
#14 Objavljeno: 16. 9. 2021. 09:40:26
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Wrote

I really don't get what's wrong now...

Sphere and cubic Bezier curve intersection points.sm (12,04 KiB) preuzeto 1320 put(ova).



There is a missing "*"
missing.png
#15 Objavljeno: 16. 9. 2021. 11:07:40
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Wrote

Wrote

I really don't get what's wrong now...

Sphere and cubic Bezier curve intersection points.sm (12,04 KiB) preuzeto 1320 put(ova).



There is a missing "*"
missing.png



Thank you! But what should I do with «r is undefined»? 🤔
#16 Objavljeno: 16. 9. 2021. 11:12:25
Oscar Campo

Oscar Campo

135 svidjanja u 309 postova.

Grupa: Moderator

Are you sure you are using the option "Symbolic Optimization"?

You must right-click over your equation, then choose Optimization-Symbolic
#17 Objavljeno: 16. 9. 2021. 11:40:06
Necronomicron

Necronomicron

0 svidjanja u 8 postova.

Grupa: User

Wrote

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! 😊
#18 Objavljeno: 16. 9. 2021. 14:52:16
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

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.
#19 Objavljeno: 16. 9. 2021. 20:16:44
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

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 (30,64 KiB) preuzeto 1521 put(ova).
#20 Objavljeno: 16. 9. 2021. 21:20:45
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

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 korisnika je svidelo ovu objavu
fedeghi 17. 9. 2021. 03:24:00
  • Novi postovi
  • Nema novih postova