The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 plot a sphere
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lafaurie

France
1 Posts

Posted - 09/29/2000 :  8:10:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
how can I plot a sphere of center x0,y0,z0 and radius R

rtoomey

USA
184 Posts

Posted - 01/26/2001 :  2:00:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

A sphere must be created in two halves in Origin. To do so, open two empty matrix windows (called Matrix1 and Matrix2). Then, perform the following operations:



1 - Select Matrix1 and then the Matrix => Set (Matrix) Values menu.
2 - Enter in a ternary operator similar to the following:

sqrt(x^2+Y^2)>10?(0/0):(+1*sqrt(100-X^2-Y^2))

3 - Click OK (or Do It depending on your version).
4 - Activate Matrix2 and perform steps 1 - 3 using an equation similar to the following:

sqrt(x^2+Y^2)>10?(0/0):(-1*sqrt(100-X^2-Y^2))

5 - Plot Matrix2 (which represents the bottom half of the sphere) first. To do that, activate Matrix2 and select the desired plot type from the Plot3D menu.
6 - Add Matrix1 to the graph through the Layer dialog box. To do that, double-click on the layer 1 icon in the top left corner of the graph. Then, select Matrix1 from the list of Available Datasets and click the right arrow (=>) button. This moves it into the Layer Contents. Click OK to complete the task.



Note: There are two additional steps which must be taken to make the sphere look correct.

First, the Z axis scale must be updated to accommodate both surface plots. In this example, the Z axis should be -10 to 10. To update it, select Format => Axes => Z Axis and update the From and To text boxes on the Scale tab.

Second, if Speed Mode is on, turn it off. To do that, select Format => Layer and disable the "Matrix data, maximum points per dimension" check box on the Size/Speed tab. If you are using an earlier version of Origin (i.e. prior to 6.0), Speed Mode will not affect your plot. You can therefore skip this step.



I hope this information proves helpful. If you are not satisfied with this suggestion or have questions, please contact your local technical support representative in France.

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000