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
 from 2D data into 3D extrusion

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
KCl34 Posted - 10/25/2017 : 4:14:00 PM
Thanks for the support to this question. Old rusted user of Origin. Started using it again few months ago. I missed it so much.

I have a question: I have data for a chart in 2D; I would like to use the data to generate a 3D chart by a rotation extrusion (360)using one point of the X-axis as the center for the extrusion.

Ideas?

Emanuele cauda
3   L A T E S T    R E P L I E S    (Newest First)
KCl34 Posted - 10/27/2017 : 4:08:58 PM
Yuki, Hideo,
Thanks so much for the suggestions. I am going to try them up in the next few days and will let you know.

Emanuele cauda
yuki_wu Posted - 10/27/2017 : 03:40:36 AM
Hi Emanuele cauda,

Besides the way Hideo introduced, we can also take advantage of the matrix and parametric surface.

For example, I have an XY plot with 50 pairs of data points:


1. New a matrix book, select Matrix: Set Dimension/Labels from menu


2. Select Matrix: Set Value… from menu
Cell(i,j) = ra[j]
Before Formula Script: range ra=[Book1]Sheet1!col(B)


3. Add the second matrix object in the matrix sheet, select the second matrix object and then select Matrix: Set Value…
Cell(i,j) = y

4. Add the third matrix object in the matrix sheet, select the third matrix object and then select Matrix: Set Value…
Cell(i,j) = rx[j]
Before Formula Script: range rx=[Book1]Sheet1!col(A)


5. Add the fourth matrix object in the matrix sheet, select the fourth matrix object and then select Matrix: Set Value…
Cell(i,j) = Mat(1)*cos(Mat(2))

6. Add the fifth matrix object in the matrix sheet, select the fifth matrix object and then select Matrix: Set Value…
Cell(i,j) = Mat(1)*sin(Mat(2))

7. Select the fifth matrix, and plot a 3D surface

8. Double click the surface to open Plot Detail dialog, go to Surface tab, check Parametric Surface checkbox, then select Mat(3) in X Matrix and Mat(4) in Y Matrix.


9. Click the Rescale button


If you are interested, you can download the OPJ and play with it:
https://www.dropbox.com/sh/phr7k6s29mn3nix/AACBuvXHkE1G-KZznzzjSvzZa/FilesToUsers?dl=0&preview=20171027-3D+Rotate+Surface.opj

Regards,
Yuki
OriginLab
Hideo Fujii Posted - 10/26/2017 : 1:58:48 PM
Hi Emanuele cauda,

When y=f(x), you can take x as the radius for (X, Y), and y as Z.
So, the following script calculate (X,Y,Z):
///////////////////////////////////////////////////////
range rr=col(1);  //original X
nr=rr.getSize();  //number of rows
kk=1;             //output counter
for(ii=1; ii<=nr; ii++) {  //take X
  for(angle=0; angle<=360; angle++) {
    col(3)[kk]=col(1)[ii]*cos(radians(angle));    //X in 3D
    col(4)[kk]=col(1)[ii]*sin(radians(angle));    //Y in 3D
    col(6)[kk]=col(1)[ii];   //Radius
    col(5)[kk]=col(2)(col(1)[ii]);                //Z in 3D
    kk=kk+1;
  }
}
///////////////////////////////////////////////////////

You see the result graphs as follows:


Hope this helps.

--Hideo Fujii
OriginLab

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