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
 All Forums
 Origin Forum
 Origin Forum
 plot a sphere

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
lafaurie Posted - 09/29/2000 : 8:10:00 PM
how can I plot a sphere of center x0,y0,z0 and radius R
1   L A T E S T    R E P L I E S    (Newest First)
rtoomey Posted - 01/26/2001 : 2:00:07 PM

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.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000