camOrbit

版本 1.0.3.1 (4.5 KB) 作者: FINNSTAR7
Animates the camera rotating around a camera target. Allows orbits in multiple subplots of a figure. Saves as a movie or gif.
87.0 次下载
更新时间 2020/4/13

查看许可证

Description:
Not to be confused with the already built-in camorbit function (https://www.mathworks.com/help/matlab/ref/camorbit.html). camOrbit creates an animation of the camera rotating around a camera target. Allows orbits to occur in multiple subplots of a figure. Animations can be saved as a movie or gif.

Syntax:
• camOrbit
• camOrbit(FigureHandle, ...)
• camOrbit(FigureHandle, AxisHandles, ...)
• camOrbit('fps', FramesPerSecond, 'time', AnimationDuration, 'width', Width, 'height', Height, 'fullscreen', True/False)
• camOrbit('theta', HorizontalRotationAngles, 'phi', VerticalRotationAngles, 'axis', AxisOfRotation, 'cordsys', CoordinateSystems)

Defaults:
• FigureHandle - if none specified just uses the current figure
• AxisHandles - an array of subplot handles to be animated, if none specified just uses the current axis of target figure
• 'fps' - FPS of final animation, defaults to 30 frames per second
• 'time' - duration of final animation in seconds, defaults to 15 seconds
• 'width' - width of final animation, defaults to current figure size
• 'height' - height of final animation, defaults to current figure size
• 'fullscreen' - defaults to off (false)
• 'theta' - an array of maximum horizontal rotation angles in degrees for each AxisHandle, defaults to 360 degrees per active subplot
• 'phi' - an array of maximum vertical rotation angles in degrees for each AxisHandle, defaults to 360 degrees per active subplot
• 'axis' - an array of axis of rotation for each AxisHandle, defaults to [0 0 1] (z-axis) per active subplot
• 'cordsys' - a cell array of coordinate systems for each AxisHandle, defaults to 'data' (the coordinate system relative to the data) per active plot; use 'camera' to use the coordinate system relative to the camera

Saving:
• Final animations can be saved as an .avi (Uncompressed AVI), .gif (GIF), .mp4 (MPEG-4), or .mj2 (Archival)

Uses:
• For any 3D plots or subplots you wish to automatically orbit the camera around and save as a movie or gif.
• Can orbit a single plot, an individual subplot, multiple subplots, or all subplots at the same time.

Limitations:
• Can't be used in conjunction with plots that are already being animated (moving waves, etc.). Use MatLab's built in camorbit function for that instead.
• Unsure how it performs for MatLab versions before R2017a or OSs besides Windows, though it should work fine. If problems arise let me know.

引用格式

FINNSTAR7 (2024). camOrbit (https://www.mathworks.com/matlabcentral/fileexchange/74975-camorbit), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2017a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.3.1

Expanded Description slightly

1.0.3

Preventing render from being closed manually instead of pressing Cancel button on the load bar. Closing the figure itself would leave a non-deletable, paused loading bar on screen.

1.0.2.4

Jeez, you'd think there'd be some sort of guide or something on how to format a File Exchange page

1.0.2.3

?

1.0.2.2

Okay, now examples are moved over...maybe

1.0.2.1

Moving examples to Functions tab

1.0.2

Fix for when no properties are specified

1.0.1.3

idunno, maybe descriptions can't be formatted

1.0.1.2

?

1.0.1.1

Idk how to format this file exchange page

1.0.1

Examples

1.0.0