Forked from: gaziya's 距離関数のスキル 01 (raymarching) View Diff (75)

cross()とdot()で任意軸回転 (GLSL)

gaziya

License: MIT License

Fork
1
Fav
0
View
301
  • Play

Fullscreen

Smart Phone

Fork tree

  • Readme
  • JavaScript 32 lines
  • HTML 79 lines
  • CSS 6 lines
今回は
vec3 rotate(vec3 p,vec3 axis,float theta)
{
vec3 v = cross(p, axis), u = cross(v, axis);
return u * cos(theta) + v * sin(theta) + axis * dot(p, axis);
}
この関数のテストです。


cross()とdot()について書いてます。
https://qiita.com/gaziya5/items/52ec06b5a7dd3b345d9e
  • cross()とdot()で任意軸回転 (GLSL)
  • cross()とdot()で任意軸回転 (GLSL)

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?