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 dg1727  
#1 Posted : 11 May 2010 09:07:45(UTC)
dg1727


Rank: Member

Groups: Registered
Joined: 11/05/2010(UTC)
Posts: 15
Man

Hello,

In trying to graph an implicit function f(x,y)=K (where K is a constant) that was difficult or impossible to separate into a 1-variable function y=F(x), I came across this webpage with a Mathcad example algorithm (thanks to Mr. Ochkov for publishing this example).

I adapted the algorithm for SMath Studio, producing this .sm example.



1. Is this example appropriate for the Examples page of the wiki? If so, is there anything I should change before posting?



2. I tried to implement Mr. Ochkov's suggestion, in footnote 9 at the very end of his webpage, for speeding up the algorithm by caching previous computed values of f(x,y) instead of computing them over again. But the algorithm got slower instead. I made a .doc file and a .sm file showing this.

I tried SMath Studio's eval() function (not shown in the files, but mentioned in the .doc file) as suggested at the bottom of this wiki page. It did not help.

Is there anything simple I can do to speed up the algorithm? Any suggested solution should not depend on what kind of function f(x,y) is. The function that appears in my example files is of a different kind than the function that I originally needed to plot (at my workplace).

Maybe future optimizations in SMath Studio could be made to help with cases like this. It is not (yet Good ) important to me, though.

Thanks in advance for any comment.

Edited by user 15 May 2010 21:30:17(UTC)  | Reason: Moved attachments from 3rd-party hosting service to wiki

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

Offline omorr  
#2 Posted : 11 May 2010 13:19:23(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,

Feel free to put your examples on the Wiki. There are no restrictions. Make them however you like. You are free to put also your comments and anything you feel that would be useful for other users.
Moreover, you can upload files there as well.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline dg1727  
#3 Posted : 11 May 2010 20:24:38(UTC)
dg1727


Rank: Member

Groups: Registered
Joined: 11/05/2010(UTC)
Posts: 15
Man

I have updated the example slightly:

ImplicitFunctionGrapher_slow.sm (ZIPped)
ImplicitFunctionGrapher_1.pdf

Please use the updated versions, rather than the versions in my first posting, if possible. Thanks.

Edited by user 15 May 2010 22:09:56(UTC)  | Reason: Moved attachments from 3rd-party hosting service to wiki

Offline Andrey Ivashov  
#4 Posted : 11 May 2010 21:42:14(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thank you, dg1727!

I've changed optimization method of the main loop of the file to Numeric (it helps to save about 40% of calculation time - 1 min. 46 sec. on my notebook now) and have uploaded your files to SMath server:

ImplicitFunctionGrapher.sm
ImplicitFunctionGrapher.pdf



Additional examples were tested:

x^2*y^3-7*x^3*y^3-7


(x^2+y^2)^2-7*(x^2-y^2)


Regards.

Edited by user 12 May 2010 02:18:18(UTC)  | Reason: Not specified

Offline dg1727  
#5 Posted : 12 May 2010 05:26:38(UTC)
dg1727


Rank: Member

Groups: Registered
Joined: 11/05/2010(UTC)
Posts: 15
Man

Thank you for the tip on setting Optimization to Numeric.

I have added a description of this procedure to the Programming page of the wiki. My apologies if I stated anything incorrectly.

I have also updated the files on the Examples page to include the Numeric optimization. (I made some minor edits as compared with the version in Andrey's post above. I wanted to make sure the .pdf matched the .zip.)
Offline omorr  
#6 Posted : 12 May 2010 14:20:29(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Well done dg1727 Good

Thank you.

Fell free to add to the Wiki anything you might find useful for other users.

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Users browsing this topic
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.