フィルターのクリア

help with block letter

6 ビュー (過去 30 日間)
random1072
random1072 2020 年 4 月 16 日
コメント済み: random1072 2020 年 4 月 16 日
im trying to create a W stencil. shown is what i currently have along with my code and also my desired w output. any help would be awesome. thank you.
  2 件のコメント
Geoff Hayes
Geoff Hayes 2020 年 4 月 16 日
Mitch - please attach your code rather than a screenshot of it. Also, does the second image represent what your code produces?
random1072
random1072 2020 年 4 月 16 日
Hello Geoff, yes the second image is my current output and the third image is my desired output for letter W. attatched is my code. Thank you

サインインしてコメントする。

採用された回答

Geoff Hayes
Geoff Hayes 2020 年 4 月 16 日
I think that part of the problem with the x positions in that there are too many that are the identical. If we look at the desired image and at each vertex, none have the same x position/coordinate yet the code produces 5 at -0.892857142857143 and 5 at 0.892857142857143. (Duplication is expected for the y-coordinates.) Also, it isn't clear where some of the factors (i.e 0.56) originate from so perhaps you just want to start simple and make some easy assumptions. If we assume that the width of the stencil (the 0.5) is the same as the base of the three triangles (the two upsidedown ones and the one in the middle) then just start in the middle at (0,center_height) and move clockwise around the letter. To get you started, you might do
total_height = 2*center_height; % I think this should be true?
total_width = total_height/aspect;
trunkWidth = (1/5)*total_width;
pos = [ 0 , center_height;
-0.5*trunkWidth , 0; % moving counter clockwis
-1.5*trunkWidth , 0;
% etc.
  1 件のコメント
random1072
random1072 2020 年 4 月 16 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by