こんにちは!たやち(tayati_369)です!!
プログラミングで何かしようとするんは難しいんじゃ〜。(千鳥風)
そもそも何がしたかったかというと、透明度が高くて青みがかったガラスを表現したかったのです。
そのためにまずは、四角をを作ろうと思いました。
ただ、真四角な形を作っても面白みがないのでサイドをゆらゆらとした(表現あってるのかw)形にしようと思いました。
なので、このcodeは三角関数を使用して、サイドのゆらぎのある線を連続的に引くことで四角に見せています。
単純なcodeですが、初めて自分で形作ることのできるcodeができたのでとっても嬉しい!
これからももっと自分が美しいと思うものが作りたい!
void setup(){ smooth(); pixelDensity(2); size(800, 800); colorMode(HSB,360,100,100,100); //rectMode(CENTER); } void draw(){ background(0,0,100); glass(); } void glass(){ float j=1; float leftx, lefty, rightx, righty; float radian=0; for(float i=0; i<400; i+=0.1){ stroke(200, 70, 95, j*noise(1)); radian=radians(i); leftx = 20*sin(4*radian/5)+width/4; lefty = 20*cos(4*radian/5)+3*height/4-i; rightx = 20*sin(4*radian/5)+3*width/4; righty = 20*cos(4*radian/5)+3*height/4-i; beginShape(); vertex(leftx, lefty); vertex(rightx, righty); endShape(); j+=0.004; } } void keyPressed(){ if(key == 's'){saveFrame("###.jpg"); } }
ではでは、さようなら〜〜〜。
Instagram:tayati_369
Twitter:tayati369
コメント
Thank you, I’ve just been looking for information about this topic
for ages and yours is the greatest I’ve discovered
so far. But, what concerning the conclusion? Are you positive in regards to
the source?
Hello, this weekend is nice in favor of me, as this occasion i am reading
this enormous informative post here at my home.