Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
dbForge Studio for PostgreSQL 2.3.212
HTMLPad 2020 16.2
WeBuilder 2020 16.2
Rapid CSS 2020 16.2
Rapid PHP 2020 16.2
C# HTML to PDF 2020.8.1
Flowrigami 1.0.0.1
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Top Code
IcrediBB Bulletin Board System 1.0
Skincare Management System for Scripts 1.4
Taxi Booking Script 1.0.4
Extreme Injector 3.7
Readability Analyzer 7.x-1.0-rc2
Sportsbook software by BOOKIE Software 3.01
Betting system 6.x-1.x-dev
Unix Time Stamp Calculator 1.0
Two Dimensional Random Walk 1.0
shopping mall management system 1.0
Uber Clone with Safety Measure Addons 2.0
phpEnter 5.1.
Single Leg MLM 1.2.1
Availability Booking Calendar PHP 1.0
Azizi search engine script PHP 4.1.10
Top Rated
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Apphitect Airbnb Clone Script 1.0
Deals and Discounts Website Script 1.0.2
Pro MLM 1
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
polyrevolve 1.0
File ID: 86665






polyrevolve 1.0
Download polyrevolve 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 4
Submit Rating:
polyrevolve 1.0 Description
Description: [X,Y,Z]=polyrevolve(x,z,n)

This function revolves a 2D polygon around the Z-axis. It copies the 2D data points evenly around the axis and produces a 3D data set suitable for input to MESHGRID and GRIDDATA to create a 3D surface.
Useful to convert 2D axisymmetric data to 3D surfaces for presentation and or analysis.
The spacing from one revolved point to the next is defined by the parameter n. The required angular spacing (alpha) for each point is determined using the relationship n=2*r*sin(alpha).

%% EXAMPLE:
clear all; close all; clc;
x=0:0.2:2*pi;
z=sin(x+(pi/2));
revolve_res=0.2;
[X,Y,Z]=polyrevolve(x,z,revolve_res);

grid_res=0.05;
[XI,YI] = meshgrid(min(min(X)):grid_res:max(max(X)),min(min(Y)):grid_res:max(max(Y)));
ZI = griddata(X,Y,Z,XI,YI,'cubic');
figure; fig=gcf; clf(fig); units=get(fig,'units'); set(fig,'units','normalized','outerposition',[0 0 1 1]); set(fig,'units',units);
plot(x,z,'r-'); hold on; axis equal;
xlabel('x (mm)'); ylabel('z (mm)');
title('The polygon');
xlabel('x (mm)'); ylabel('z (mm)');
figure; fig=gcf; clf(fig); units=get(fig,'units'); set(fig,'units','normalized','outerposition',[0 0 1 1]); set(fig,'units',units);
plot3(X,Y,Z,'k.'); hold on; axis equal;
title('Data "copied" around z-axis using POLYREVOLVE');
xlabel('x (mm)'); ylabel('y (mm)'); zlabel('z (mm)');
figure; fig=gcf; clf(fig); units=get(fig,'units'); set(fig,'units','normalized','outerposition',[0 0 1 1]); set(fig,'units',units);
surf(XI,YI,ZI,'EdgeColor','none'); hold on; axis equal;
shading interp; material shiny; lightangle(45,30);
title('Surface fit of the revolved data points');
xlabel('x (mm)'); ylabel('y (mm)'); zlabel('z (mm)');

License: Shareware

Related: setfig units units, units dgetfig units, clffig, plotxz, Equal, mm039, xlabel, fig dgcf, figure, dsinx bpi

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 4



User Review for polyrevolve
- required fields
     

Please enter text on the image