Discussions

Petit computer 3 Community

キルル2kiruru2

09/14/2017 7:33 AM ·Spoilers

Open Closed

高次のベジェ曲線を描くには?

今、3次のベジェ曲線を描くプログラムをつくったのですが、この画像の方法だと、次数が増えると共に記述が大変になってしまいます。(2ケタを越えると、もはや対応できない) そこで、N次のベジェ曲線を描く方法を教えていただきたいと思います。 調べた限りでは再帰を使うと良いらしいのですが、どうもうまく組めませんでした。 ごく簡単なものでも構いません。ぜひお答えください。

Advertisement

Comment

This post has no comments.

  • PX=CX(N,N,I)'N次のベジエ曲線の場合 PY=CY(N,N,I)'N次のベジエ曲線の場合 DEF CX(N,K,T) IF N>0 THEN RETURN F(CX(N-1,K-1,T),CX(N-1,K,T),T) ELSE 'N=0 の場合 RETURN X[K] ENDIF END DEF CY(N,K,T) CXと同様に... END これで出来るとおもいます

    Yeahs0
    Played
  • 再帰呼び出しに関してはここのZEXさんのコメントが参考になると思います https://miiverse.nintendo.net/posts/AYMHAAACAAADV0Z6zpVNUw?locale.lang=ja-JP

    Yeahs0
    Played
  • ごめんなさい。ベジェ曲線の次数Nと配列X,Yの要素数Nが混ざって説明がおかしくなったのでリストの全文アップしときます[2D3V3394]

    Yeahs0
    Played
  • リストのつづき

    Yeahs0
    Played
  • 何とかできました! ありがとうございます!!

    Yeahs2
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-DPU-2NL8-B8H-TVP2

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: