[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to make a column/cone on a surface?
From: |
nelse003 |
Subject: |
How to make a column/cone on a surface? |
Date: |
Wed, 17 Nov 2010 08:42:04 -0800 (PST) |
I am trying to display a cone/circular column using If statements within this
function, I have managed to set it make an rectangular shape, but i am
confused on how to change the function. I need to be able to set the
dimensions of the cone/column as arguments of the function.
function myfunk5(k,a,h,b)
fy=(rand(1,1));
fx=(rand(1,1));
Mx=50;
My=50;
for i=1:100
for j=1:100
if i>=j ((i<=Mx+a)&(i>=Mx-a))&((j<=My+b)&(j>=My-b))
z(i,j)=h;
else
z(i,j)=sin((k*i)+fx)*cos((k)+fy);
if i<=j ((i<=Mx+a)&(i>=Mx-a))&((j<=My+b)&(j>=My-b))
z(i,j)=h;
else
z(i,j)=sin((k*i)+fx)*cos((k*j)+fy);
end
end
end
end
surf(z)
view(45,45);
shading interp;
http://octave.1599824.n4.nabble.com/file/n3047123/9n-3.jpg
--
View this message in context:
http://octave.1599824.n4.nabble.com/How-to-make-a-column-cone-on-a-surface-tp3047123p3047123.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to make a column/cone on a surface?,
nelse003 <=
- Prev by Date:
Re: set(h,'color',[1,0,0 ; 0,1,0 ; 0,0,0]) or set(h,'color',mat2cell(rainbow(3))) ??
- Next by Date:
programming help
- Previous by thread:
eval(sprintf("title('Ar-Beam(TC%iarBeam%i), %i')", nMessreihe, uu, NameCellstr[rr])) doesn't work, but why ?
- Next by thread:
inserting text and autoscaling (xlimmode)
- Index(es):