Submit Search
Upload
Surface rendering
•
Download as DOCX, PDF
•
2 likes
•
235 views
Shobhit Saxena
Follow
surface rendering program code in matlab
Read less
Read more
Education
Report
Share
Report
Share
1 of 14
Download now
Recommended
True angle between lines and planes
True angle between lines and planes
Sinokia Lee
Take Off And Landing Performance
Take Off And Landing Performance
ahmad bassiouny
Projection of planes
Projection of planes
Vaibhav Bajaj
Control and Guidance law for Guided Bomb
Control and Guidance law for Guided Bomb
Mohammed Osman
PROJECTION OF POINTS
PROJECTION OF POINTS
Student
projections of planes
projections of planes
sushma chinta
Engineering Curves
Engineering Curves
ANIKET SURYAWANSHI
8.projection of-planes-engineering108.com
8.projection of-planes-engineering108.com
Digvijaysinh Gohil
Recommended
True angle between lines and planes
True angle between lines and planes
Sinokia Lee
Take Off And Landing Performance
Take Off And Landing Performance
ahmad bassiouny
Projection of planes
Projection of planes
Vaibhav Bajaj
Control and Guidance law for Guided Bomb
Control and Guidance law for Guided Bomb
Mohammed Osman
PROJECTION OF POINTS
PROJECTION OF POINTS
Student
projections of planes
projections of planes
sushma chinta
Engineering Curves
Engineering Curves
ANIKET SURYAWANSHI
8.projection of-planes-engineering108.com
8.projection of-planes-engineering108.com
Digvijaysinh Gohil
Projection of Planes- Engineering Graphics
Projection of Planes- Engineering Graphics
Dr Ramesh B T
Unit ii projection of points
Unit ii projection of points
ganesasmoorthy raju
Principle of flight
Principle of flight
Vigneshwaran Gunasekaran
Projections of Planes
Projections of Planes
ANIKET SURYAWANSHI
Projection of Plane Step by step Process
Projection of Plane Step by step Process
Prof. S.Rajendiran
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Dr. Bhuiyan S. M. Ebna Hai
Engineering Graphics - Projection of points and lines
Engineering Graphics - Projection of points and lines
Jayanshu Gundaniya
Relative velocity method_04
Relative velocity method_04
physics101
B.tech i eg u2 loci of point and projection of point and line
B.tech i eg u2 loci of point and projection of point and line
Rai University
Projection of Lines
Projection of Lines
ANIKET SURYAWANSHI
Mechanism 1 eng
Mechanism 1 eng
FritzRokitta
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
singhanubhav1234
Project filter matlab
Project filter matlab
girma disasa
Fourier series example
Fourier series example
Abi finni
Take Off And Landing Performance
Take Off And Landing Performance
ahmad bassiouny
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Ahmed Momtaz Hosny, PhD
Please show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdf
arshiartpalace
Lateral directional stability effect horiz tail
Lateral directional stability effect horiz tail
Ahmed Chegrani
Dsp manual
Dsp manual
Vijendrasingh Rathor
5. lec5 curl of a vector
5. lec5 curl of a vector
shabdrang
Polygraph
Polygraph
yuyabu
Analytical solution of the relative orbital motion in unperturbed elliptic or...
Analytical solution of the relative orbital motion in unperturbed elliptic or...
IRJET Journal
More Related Content
What's hot
Projection of Planes- Engineering Graphics
Projection of Planes- Engineering Graphics
Dr Ramesh B T
Unit ii projection of points
Unit ii projection of points
ganesasmoorthy raju
Principle of flight
Principle of flight
Vigneshwaran Gunasekaran
Projections of Planes
Projections of Planes
ANIKET SURYAWANSHI
Projection of Plane Step by step Process
Projection of Plane Step by step Process
Prof. S.Rajendiran
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Dr. Bhuiyan S. M. Ebna Hai
Engineering Graphics - Projection of points and lines
Engineering Graphics - Projection of points and lines
Jayanshu Gundaniya
Relative velocity method_04
Relative velocity method_04
physics101
B.tech i eg u2 loci of point and projection of point and line
B.tech i eg u2 loci of point and projection of point and line
Rai University
Projection of Lines
Projection of Lines
ANIKET SURYAWANSHI
Mechanism 1 eng
Mechanism 1 eng
FritzRokitta
What's hot
(11)
Projection of Planes- Engineering Graphics
Projection of Planes- Engineering Graphics
Unit ii projection of points
Unit ii projection of points
Principle of flight
Principle of flight
Projections of Planes
Projections of Planes
Projection of Plane Step by step Process
Projection of Plane Step by step Process
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Design Analysis Of Uav (Unmanned Air Vehicle) Using NACA 0012 Aerofoil Profile
Engineering Graphics - Projection of points and lines
Engineering Graphics - Projection of points and lines
Relative velocity method_04
Relative velocity method_04
B.tech i eg u2 loci of point and projection of point and line
B.tech i eg u2 loci of point and projection of point and line
Projection of Lines
Projection of Lines
Mechanism 1 eng
Mechanism 1 eng
Similar to Surface rendering
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
singhanubhav1234
Project filter matlab
Project filter matlab
girma disasa
Fourier series example
Fourier series example
Abi finni
Take Off And Landing Performance
Take Off And Landing Performance
ahmad bassiouny
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Ahmed Momtaz Hosny, PhD
Please show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdf
arshiartpalace
Lateral directional stability effect horiz tail
Lateral directional stability effect horiz tail
Ahmed Chegrani
Dsp manual
Dsp manual
Vijendrasingh Rathor
5. lec5 curl of a vector
5. lec5 curl of a vector
shabdrang
Polygraph
Polygraph
yuyabu
Analytical solution of the relative orbital motion in unperturbed elliptic or...
Analytical solution of the relative orbital motion in unperturbed elliptic or...
IRJET Journal
Linear transformations and matrices
Linear transformations and matrices
EasyStudy3
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
meerobertsonheyde608
vertical-curves
vertical-curves
Mohamed Hesham
stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?
NETWAYS
Resonant circuits
Resonant circuits
arjav patel
Backstepping linearization controller of the Delta Wing Rock Phenomena
Backstepping linearization controller of the Delta Wing Rock Phenomena
IJERA Editor
Aircraft propulsion performance of propellers
Aircraft propulsion performance of propellers
Anurak Atthasit
Sideslip
Sideslip
Age of Aerospace
Aircraft Performance and Design Project Code
Aircraft Performance and Design Project Code
Elliot Farquhar
Similar to Surface rendering
(20)
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
function [M]=trajectory3(x,y,z,pitcher,roll,yaw,scale_factor,step,se.pdf
Project filter matlab
Project filter matlab
Fourier series example
Fourier series example
Take Off And Landing Performance
Take Off And Landing Performance
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Matlab codes for Sizing and Calculating the Aircraft Stability & Performance
Please show the whole code... Im very confused. Matlab code for ea.pdf
Please show the whole code... Im very confused. Matlab code for ea.pdf
Lateral directional stability effect horiz tail
Lateral directional stability effect horiz tail
Dsp manual
Dsp manual
5. lec5 curl of a vector
5. lec5 curl of a vector
Polygraph
Polygraph
Analytical solution of the relative orbital motion in unperturbed elliptic or...
Analytical solution of the relative orbital motion in unperturbed elliptic or...
Linear transformations and matrices
Linear transformations and matrices
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
vertical-curves
vertical-curves
stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?
Resonant circuits
Resonant circuits
Backstepping linearization controller of the Delta Wing Rock Phenomena
Backstepping linearization controller of the Delta Wing Rock Phenomena
Aircraft propulsion performance of propellers
Aircraft propulsion performance of propellers
Sideslip
Sideslip
Aircraft Performance and Design Project Code
Aircraft Performance and Design Project Code
More from Shobhit Saxena
***भारत की जय जय कार ***
***भारत की जय जय कार ***
Shobhit Saxena
DFD For E-learning Project
DFD For E-learning Project
Shobhit Saxena
Index page of lab file
Index page of lab file
Shobhit Saxena
Write a program to perform Perspective projection
Write a program to perform Perspective projection
Shobhit Saxena
Write a program to perform Oblique projection
Write a program to perform Oblique projection
Shobhit Saxena
Write a program to perform Orthographic projection.
Write a program to perform Orthographic projection.
Shobhit Saxena
Write a program to draw a cubic Bezier curve.
Write a program to draw a cubic Bezier curve.
Shobhit Saxena
Write a program to perform translation.
Write a program to perform translation.
Shobhit Saxena
Graphics and Graphics Hardware System
Graphics and Graphics Hardware System
Shobhit Saxena
Cover letter
Cover letter
Shobhit Saxena
WEEKLY PROGRESS REPORT (WPR) for DISSERTATION
WEEKLY PROGRESS REPORT (WPR) for DISSERTATION
Shobhit Saxena
Progress report for research paper
Progress report for research paper
Shobhit Saxena
Opticalcharacter recognition
Opticalcharacter recognition
Shobhit Saxena
Ionic app
Ionic app
Shobhit Saxena
Window to viewprt
Window to viewprt
Shobhit Saxena
Write a program to perform translation
Write a program to perform translation
Shobhit Saxena
Community outreach portfolio shobhit
Community outreach portfolio shobhit
Shobhit Saxena
Ch22 parallel d_bs_cs561
Ch22 parallel d_bs_cs561
Shobhit Saxena
Shobhit portfolio
Shobhit portfolio
Shobhit Saxena
More from Shobhit Saxena
(19)
***भारत की जय जय कार ***
***भारत की जय जय कार ***
DFD For E-learning Project
DFD For E-learning Project
Index page of lab file
Index page of lab file
Write a program to perform Perspective projection
Write a program to perform Perspective projection
Write a program to perform Oblique projection
Write a program to perform Oblique projection
Write a program to perform Orthographic projection.
Write a program to perform Orthographic projection.
Write a program to draw a cubic Bezier curve.
Write a program to draw a cubic Bezier curve.
Write a program to perform translation.
Write a program to perform translation.
Graphics and Graphics Hardware System
Graphics and Graphics Hardware System
Cover letter
Cover letter
WEEKLY PROGRESS REPORT (WPR) for DISSERTATION
WEEKLY PROGRESS REPORT (WPR) for DISSERTATION
Progress report for research paper
Progress report for research paper
Opticalcharacter recognition
Opticalcharacter recognition
Ionic app
Ionic app
Window to viewprt
Window to viewprt
Write a program to perform translation
Write a program to perform translation
Community outreach portfolio shobhit
Community outreach portfolio shobhit
Ch22 parallel d_bs_cs561
Ch22 parallel d_bs_cs561
Shobhit portfolio
Shobhit portfolio
Recently uploaded
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Sapana Sha
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
RAM LAL ANAND COLLEGE, DELHI UNIVERSITY.
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
RaunakKeshri1
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
Association for Project Management
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
eniolaolutunde
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
Jayanti Pande
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
chloefrazer622
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
pragatimahajan3
microwave assisted reaction. General introduction
microwave assisted reaction. General introduction
Maksud Ahmed
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
AyushMahapatra5
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
GeoBlogs
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
Maestría en Comunicación Digital Interactiva - UNR
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
misteraugie
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
Thiyagu K
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
Disha Kariya
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
EduSkills OECD
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
chloefrazer622
Recently uploaded
(20)
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
microwave assisted reaction. General introduction
microwave assisted reaction. General introduction
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
Surface rendering
1.
Surface Rendering Program-Revolution % parametricdeformationof
aplane intoafigure of rotation. clearall clf %make a flatsurface s1=UnitSurface(10); s1.facelighting='flat'; s1.facecolor='red'; %%getthe coordiatesof the surface anddeformthem. V=s1.vertices; %Note thaton thisplane there are onlytwonon-zerocoordinates: %V(:,2) andV(:,1) %V(:,2) ismappedintothe long-axisof the cylinder %V(:,1) ismappedintothe circulardirectionwithradiusr r=1.5 + abs(V(:,2)).*cos(2*pi*V(:,2)); %A cylinderwithradiusr,and itsaxisalignedalongthe Zaxis s1.vertices=[cos(pi*V(:,1)).*r,sin(pi*V(:,1)).*r,3*V(:,2)]; count=renderpatch(s1); axisoff;
2.
gridon daspect([11 1]) light('position',[10,-10,10]) %light('position',[10,10, 10]) %Do
a persptectivetransform set(gca,'projection','perspective') set(gca,'CameraViewAngle',8) %The frame backgroundcolor set(gcf,'color',[.6,.8,.8]) xlabel('x');ylabel('y');zlabel('z'); view(-40,20) drawnow rotate3don
3.
Program- test clf; clearall; mustard=[.7.7 .2]; orange=[1,.7,.3]; tetra=Polyhedra('tetrahedron'); tetra.facelighting='flat'; tetra.edgecolor='black'; cube1=Polyhedra('cube'); cube1.facecolor='green';
4.
cube1.facelighting='flat'; cube1.edgecolor='black'; cube1=translate(cube1,1.5,0,0); octa1=Polyhedra('octahedron'); octa1.facecolor=mustard; octa1.facelighting='flat'; octa1.edgecolor='black'; octa1=translate(octa1,3,0,0); dodeca1=Polyhedra('dodecahedron'); dodeca1.facecolor=orange; dodeca1.facelighting='flat'; dodeca1.edgecolor='none'; dodeca1=translate(dodeca1,5,0,0); icosa1=Polyhedra('icosahedron'); icosa1.facecolor='red'; icosa1.facelighting='flat'; icosa1.edgecolor='black'; icosa1=translate(icosa1,7,0,0); scene=combine(tetra,cube1,octa1,dodeca1,icosa1);
5.
count=renderpatch(scene); axisoff; gridon daspect([11 1]) light('position',[10,-10,10]) %light('position',[10,10, 10]) set(gca,'projection','perspective') set(gca,'CameraViewAngle',6) set(gcf,'color',[.6,.8,.8]) xlabel('x');ylabel('y');zlabel('z'); %view(-40,20) rotate3don Program3-airplane
6.
%Demothe hierarchical buildingsystem clearall; clf; %buildagroundplane ground.facecolor=[.1.9.1]; ground.vertices=... [-10,
-10, 0; -10, 10, 0; 10, 10 ,0; 10, -10, 0]; ground.faces=[12 3 4]; %tower tower=translate(scale(UnitCube,1,1,4),8,8,4); tower.facelighting='flat'; tower.facecolor=[.9,.2,.2]; %buildthe fusilage sphere1=UnitSphere(2); sphere1.facecolor='white'; nose=translate(scale(sphere1,3,1,1),-4.5,0,1.01); tailcap=translate(scale(sphere1,2,1,1),4.5,0,1.01); cockpit=translate(scale(UnitSphere(1.5),1.5,.75,.5),-2.5,0,2.0);
7.
cockpit.facecolor='none'; cockpit.edgecolor='black'; cyl1=UnitCylinder(2); cyl1=translate(rotateY(scale(cyl1,1,1,5),90),0,0,1.01); %cyl1.facelighting='flat'; cyl1.facecolor='white'; fusilage=combine(cyl1,nose,tailcap,cockpit); %wingandtail wing=translate(scale(UnitSphere(3),1,10,.2),-2,0,1); wing.facecolor='white'; htail=translate(scale(UnitSphere(2),1,4,.2),5,0,1); vtail=translate(rotateY(scale(UnitSphere(2),1,.2,2),30),5,0,2); wingtail=combine(wing,htail,vtail); for time=0:.1:1 %motorsandpropellors motor=scale(UnitSphere(2),1.5,.5,.5); motor.facecolor='white'; motors={ translate(motor,-2,3,1)
translate(motor,-2,-3,1) }; prop=rotateX(scale(UnitSphere(1.5),.1,2,.2),time*90); prop.facecolor='black'; props=combine(... translate(prop,-3.1,-3,1),...
8.
translate(prop,-3.1,3,1) ); motorprop=combine(motors,props); plane=combine( fusilage,wingtail,motorprop); plane=translate(plane,0,0,1); clf scene=combine(
ground,tower,plane ); count=renderpatch(scene); axisoff; gridon daspect([11 1]) light('position',[10,-10,10]) %light('position',[10,10, 10]) %Do a persptectivetransform set(gca,'projection','perspective') set(gca,'CameraViewAngle',6) %The frame backgroundcolor set(gcf,'color',[.6,.8,.8]) xlabel('x');ylabel('y');zlabel('z'); view(-40,20)
9.
drawnow; end%for rotate3don Program-4-arm-device cyl = UnitCylinder(2); L1
= 3; L2 = 2; L3 = 1; radius= .3; w1 = 5; w2 = 10;
10.
w3 = 30; arm1
= translate(scale(cyl,radius,radius,L1/2),0,0,L1/2); arm1.facecolor= 'blue'; arm2 = translate(scale(cyl,radius,radius,L2/2),0,0,L2/2); arm2.facecolor= 'green'; arm3 = translate(scale(cyl,radius,radius,L3/2),0,0,L3/2); arm3.facecolor= 'red'; angle1= 0 ; angle2= 0 ; angle3= 0; for i = 1:36 distal = combine(translate(rotateY(arm3,angle3),0,0,L2),arm2); distal = rotateY(distal,angle2); arm = combine(translate(distal,0,0,L1),arm1); arm = rotateY(arm,angle1); cla renderpatch(arm); camlight box on view(30,30) drawnow
11.
set(gca,'xlim',[-55],'ylim',[-55],'zlim',[-55]) angle1= angle1+ w1
; angle2= angle2+ w2 ; angle3= angle3+ w3 ; end Program-pot(name programotherthancup) %buildacup sittingona table clearall clf
12.
res=15 ; %buildthe cupbody %bymakinga
closed-endcylinder cyl1=CSGcylinder(0,0,0,.45,'z',res); cube1=CSGcube(0,0,-.5,.5,res); body=CSGintersection(cyl1,cube1); %thensubtractinganother,smallercylinder cyl2=CSGcylinder(0,0,0,.35,'z',res); cube2=CSGcube(0,0,-.4,.4,res); hole=CSGintersection(cyl2,cube2); body=CSGsubtract(body,hole); %make the handle s1=CSGsphere(.6,0,-.4,.3,res); cyl3=CSGcylinder(.6,0,-.4,.15,'y',res); handle=CSGsubtract(s1,cyl3); %joinhandle andbodytomake the cup cup=CSGunion(body,handle); cupSurface=CSGtoSurface(cup,res);
13.
cupSurface.facecolor='yellow'; %nowmake a place
to setthe cup table=UnitCube; table.facecolor=[1,.6,.6]; table.facelighting='flat'; table.edgecolor='red'; table=scale(table,1,1,.2); table=translate(table,0,0,-1.2); scene=combine(cupSurface,table); count=renderpatch(scene) axisoff; gridon daspect([11 1]) light('position',[10,0,10]) %light('position',[10,10, 10]) %Do a persptectivetransform set(gca,'projection','perspective') set(gca,'CameraViewAngle',8)
14.
%The frame backgroundcolor set(gcf,'color',[.6,.8,.8]) xlabel('x');ylabel('y');zlabel('z'); view(7,20) drawnow rotate3don
Download now