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
 Control 3D plots (with projection) from labtalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jdf726

78 Posts

Posted - 07/12/2018 :  05:03:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2016 Pro (I have upgrade available, but haven't installed it!)
Operating System: WIn 7

Hi,

I have a 3D plot of a peaked data set and a projection underneath it using the 3D plot with projection feature (I think it looks awesome, but then I am biased!)

After a few hours of GUI tinkering I figured out how to control light source and the settings for the axes.

I would now like to make an animated plot which rotates the axes.
This needs still frames rendered at different angles.
Obviously, a for loop with the control parameters is required, with an export to image at each setting.

Is there an example script for 3D print settings that controls these parameters?
(I may have to rotate the light source with the axis, otherwise it is more like flying around to the shady side of the mountain!)

This is the kind of thing that you can do really easily in matlab, but when I did a quick google I didn't find any programmatic control.


J.

lkb0221

China
497 Posts

Posted - 07/12/2018 :  09:30:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please check LT cmd layer -3d r in the page below:
https://www.originlab.com/doc/LabTalk/ref/Layer-cmd#-3d_r.3B_set_the_3D_graph_rotation

You can also see their existing sample code 3D Surface Plot form Virtual Matrix (row2, col2):
https://www.originlab.com/animation

SZ

Edited by - lkb0221 on 07/12/2018 09:31:10 AM
Go to Top of Page

jdf726

78 Posts

Posted - 07/12/2018 :  11:13:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Awesome - thanks!

My plot does look a bit like Mt. St Helens!

I'll share a vid when I have published it ;-)

Go to Top of Page

cpyang

USA
1406 Posts

Posted - 07/13/2018 :  4:45:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
3D graph light source is fully controllable from Labtalk, but unfortunately not yet documented.

You can find all the commands if you open the light source dialog and from Code Builder temp to open LightingControlDlg.cpp.

We will add the documentation shortly.

CP
Go to Top of Page

lkb0221

China
497 Posts

Posted - 07/13/2018 :  5:22:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In case someone will be interested. I've found some hidden LT layer properties from one of their source file <exe folder>\OriginC\Originlab\LightingControlDlg.cpp

layer.light.direction.h
layer.light.direction.v
layer.light.diffuse
layer.light.kd
layer.light.specular
layer.light.ks
layer.light.shininess
layer.light.mode

to animate the rotation you mind still need to write a loop to do that manually.

Please note these commands do not trigger redraw, so "doc -uw" is needed after changes to redraw the graph.


Not sure if that can used together with the view together or not.
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