Fruit Package
Jiro‘s pick this week is A simple fruit package by kim9091.
This one is a fun and well-written example of 3D graphics using basic patch objects. You can draw 13 different kinds of fruits with ability to specify geometric parameters. For example, here’s a strawberry.
s = fruit.strawberry([0 0 0], 5); view(3) light
To change the orientation, you simply use the rotate function.
rotate(s,[0 1 0],-45)
Let’s place a slice of lemon on the side.
l = fruit.lemon([5 8 0],10); rotate(l,[1 0 0],-45)
Now, enjoy your fruit plate! (from the FEX entry)
Comments
Give it a try and let us know what you think here or leave a comment for kim9091.
- 범주:
- Picks
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.