|
|
Fill Command?
I am trying to use the fill command to shade areas of a spoke wheel pattern according to a function that I choose. I am using the fill command and specifying the vertices however MATLAB chooses to shade across the spoke horizontally and not perpendicularly as I would like so as to achieve shading that varied with radius.
Is there something similar for Cdata as there is for lighting normals in this language?
|
|
0
|
|
|
|
Reply
|
Ben
|
8/6/2010 8:03:05 AM |
|
"Ben Toomer" <bt07@ic.ac.uk> wrote in message <i3gfjp$b8v$1@fred.mathworks.com>...
> I am trying to use the fill command to shade areas of a spoke wheel pattern according to a function that I choose. I am using the fill command and specifying the vertices however MATLAB chooses to shade across the spoke horizontally and not perpendicularly as I would like so as to achieve shading that varied with radius.
>
> Is there something similar for Cdata as there is for lighting normals in this language?
hi
if i understand you correctly, then you can control the shading, and matlab has no preferred direction.
here are two long thin triangles: one has radial shading and one has vertical shading.
fill([0 0 1 0],[0 1 5 0],[1 1 2 1])
hold on
fill([0 0 1 0],[1 2 5 1],[1 2 1 1])
the numbers in [1 1 2 1] indicate the colour at each corner of the patch
Ross
|
|
0
|
|
|
|
Reply
|
Ross
|
8/13/2010 11:06:08 AM
|
|
Thanks, Ross.
I have a similar triangular spoke to this one and is composed of 300 vertices, 100 for each of the straight edges. When I define just a single vertex to have shading, I cannot control the direction into which the color is filled. Perhaps you also have a similar problem?
|
|
0
|
|
|
|
Reply
|
Ben
|
8/13/2010 12:21:04 PM
|
|
Further to the last post, this code illustrates my problem.
X = [linspace(0,1,50) linspace(1,0,50)];
Y = [linspace(0,5,50) linspace(5,1,50)];
color = zeros(1,100); color(10) = 1;
fill(X,Y,color);
You see the preference to fill in the X direction?
Thanks again. Ben
|
|
0
|
|
|
|
Reply
|
Ben
|
8/13/2010 12:28:09 PM
|
|
|
3 Replies
389 Views
(page loaded in 0.03 seconds)
Similiar Articles: Fill Command? - comp.soft-sys.matlabI am trying to use the fill command to shade areas of a spoke wheel pattern according to a function that I choose. I am using the fill command and spe... filling left side of string - comp.lang.awkI am accepting a value entered from batch file using set /p command. I need to add spaces to the left of the number entered inside an awk script nawk... /tmp (swap) getting filled up often - comp.unix.solarisFill Command? - comp.soft-sys.matlab /tmp (swap) getting filled up often - comp.unix.solaris... often ... and your spouse are able to agree, you can write up a temporary ... Populate form-fillable pdf from command line - comp.text.pdf ...I'd like to make a form-fillable pdf, fill in some fields with a command- line script and save the result (still fillable). The idea is to fill in r... Clearing filesystem cache. How? - comp.unix.programmerFill Command? - comp.soft-sys.matlab Clearing filesystem cache. How? - comp.unix.programmer... filesystems buffer/cache (short of > reading random junk into memory to fill ... "Fill" in Matlab ??? - comp.soft-sys.matlabFill Command? - comp.soft-sys.matlab I am trying to use the fill command to shade areas of a spoke wheel pattern according to a function that I choose. I am using the fill ... Inconsistent Password Files error when adding new user - comp.unix ...I admit to be new to Unix... and am trying to fill in. It looks like he brought ... However, when I attempt to add a new user with the useradd command I get a UX ... Filling paragraph with no wrap - comp.emacsEmacs's Line Wrap Commands: fill-region, unfill-region, compact ... Emacs has a command fill-paragraph 【Alt+q】 that does hard-wrap of current paragraph (it inserts a ... ghostscript: numbering pages via command line - comp.text.pdf ...Hi! a question (maybe silly, maybe not) In windows, used a grafical fronted to ghostscript *free pdf fill tools* - www.freepdffill.com one tools o... Could not complete your request because there is not enough memory ...Could not complete your request because there is not enough memory (RAM) Follow Excel 2007: Using the Fill Command, UWEC - University of Wisconsin ...Excel 2007 provides many ways to repeat information in many cells throughout a worksheet using the Fill command. This LTS Online Help document explains how to fill ... FILL Command - Microsoft Corporation: Software, Smartphones ...@ nRow1, nColumn1 FILL TO nRow2, nColumn2[COLOR SCHEME nSchemeNumber | COLOR ColorPairList] 7/21/2012 2:41:05 AM
|
|
|
|
|
|
|
|
|