Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline OchkovVF  
#1 Posted : 17 February 2024 20:50:02(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 340
Man
Russian Federation

Was thanked: 26 time(s) in 25 post(s)
Hi all!
I'm trying to solve a problem about a circle inscribed in a triangle using Newton's method. The Root function does not work.
I have some questions with how muted operators work - I don't want to set the value n - I want to use a hybrid operators for and while.
What am I doing wrong?
Triangle-Circle-Newton.sm (144kb) downloaded 5 time(s).

See please more https://community.ptc.com/t5/Mathcad/Malfatti-circles/td-p/687281

https://community.ptc.co...ze/large?v=v2&px=999

Edited by user 17 February 2024 21:10:36(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 18 February 2024 04:11:37(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1126 time(s) in 723 post(s)
Hi, first of all you have to keep hands off i if you handle complex numbers. Don't use it as iterator variable.

Second, I am not sure what for(4) actually does. Unfortunately I can't break down it to a minimum working example. The disabled region should work as the for(3) loop with exit condition but it doesn't (somehow gets stuck). Tests with trace showed that inside the for(4) loop the arithmetics seem to be rotten. For comparison I added a loop-free implementation of the algorithm by just repeating the commands in the sheet.

Once one accepts the complex numbers, the algorithm converges to a reasonable solution. Yet, the radius turns out negative for the given initial guess. This can happen because only the square of the radius occures in the model.

2024-02-17 15_01_08-SMath Solver - [Triangle-Circle-Newton_kr.sm_].png
Triangle-Circle-Newton_kr.sm (195kb) downloaded 5 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 18/02/2024(UTC)
Offline Jean Giraud  
#3 Posted : 18 February 2024 04:23:08(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
What am I doing wrong?

Augmented version of the original MCD 11
Jean

Maths Triangle ScaleneInscribed.sm (42kb) downloaded 5 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 18/02/2024(UTC)
Offline StvMath  
#4 Posted : 18 February 2024 06:10:33(UTC)
StvMath


Rank: Advanced Member

Groups: Registered
Joined: 26/07/2022(UTC)
Posts: 35
United Kingdom
Location: UK

Was thanked: 22 time(s) in 19 post(s)
I don't think you've actually adopted the KISS principle here Valery! The attached seems much simpler.


Triangle-Circle-Newton_stvmath.sm (117kb) downloaded 17 time(s).
thanks 1 user thanked StvMath for this useful post.
on 18/02/2024(UTC)
Users browsing this topic
Guest
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.