java 视频随机漫步#processing #randomwalk #video #random
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java 视频随机漫步#processing #randomwalk #video #random相关的知识,希望对你有一定的参考价值。
/*
First esperiment in random walk
applied to video
THIS IS A PROCESSING SKETCH
Change file suffix from .java to .pde
before running
*/
import processing.video.*;
Movie myMovie;
static float frameDuration = 0.1;
float maxJump = 2.0;
float jumpBias = .7;
void setup() {
size(320, 240);
myMovie = new Movie(this, "test.mp4");
myMovie.play();
image(myMovie, 0, 0);
}
void draw() {
float jump = ((randomGaussian() * maxJump) + jumpBias) * frameDuration;
float newtime = myMovie.time() + jump;
if(newtime < 0.0)
newtime = 1;
myMovie.jump(newtime);
}
void movieEvent(Movie m) {
m.read();
image(m, 0, 0);
}
以上是关于java 视频随机漫步#processing #randomwalk #video #random的主要内容,如果未能解决你的问题,请参考以下文章
Python随机漫步
Python中的 matplotlib随机漫步
数据可视化—随机漫步
随机漫步与有效市场假说
醉汉随机行走/随机漫步问题(Random Walk Drunk Python)
python数据可视化--matplotlib进行随机漫步