Location:
Search - dx t
Search list
Description: 一款接球游戏,游戏中使用DirectX 7,图形较为流畅,每秒高达50桢。具有较高的计算机人工智能.英文介绍:DX pong is a neat pong game that uses DirectX 7. I wrote it in just one day and the graphics are smooth - over 50 fps! There are sound FX too, but the best thing about the game is the computer AI. It doesn t simply chase the ball, it predicts the balls path even if it is going to bounce of several walls and moves accordingly. Clever AI doesn t mean it is impossible to beat - it means it acts like a human player making the game more fun. So - have fun!-DX pong is a neat pong game that uses DirectX 7. I wrote it in just one day and the graphics are smooth - over 50 fps! There are sound FX too, but the best thing about the game is the computer AI. It doesn t simply chase the ball, it predicts the balls path even if it is going to bounce of several walls and moves accordingly. Clever AI doesn t mean it is impossible to beat - it means it acts like a human player making the game more fun. So - have fun!
Platform: |
Size: 262532 |
Author: 刘德小花 |
Hits:
Description: 一. 追踪模型
以(x , y)代表飞机的坐标,v代表飞机的速度;以(X ,Y)代表导弹的坐标,u代表导弹的速度。
由于导弹时刻指向飞机,故有
dY/dX=(y-Y)/(x-X)
记k=u/sqrt((y-Y)*(y-Y)+(x-X)*(x-X))
则有
dY/dt=k(y-Y) dX/dt=k(x-X)
故有叠代方程
Y=Y+k*(y-Y)*dt
X=X+k*(x-X)*dt (程序中以t代dt)
程序中第一个for循环代表发射导弹打飞机,第二个for代表飞机发现导弹后做正弦运动试图逃跑。
小结:
追踪模型中关键是利用叠代方程 Y=Y+k*(y-Y)*dt 确定追踪者的运动坐标,这样,不
X=X+k*(x-X)*dt
论被追踪者做何种运动,都可利用该叠代方程找出追踪者的运动轨迹(注意追踪者的速度应大于被追踪者的速度)。
-one. Track model (x, y) coordinates of the aircraft representatives, representatives v the speed of aircraft; A (X, Y), on behalf of the coordinates of missile, u representative of the speed of the missile. As the aircraft missile at times, it is dY / dX = (y-Y) / (x-X) recorded k = u / sqrt ((y-Y) * (y-Y) (x-x) * (x-X) ) have curves / dt = k (y-Y) dX / dt = k (x-X) there is an iterative equation Y Y = k * (y-Y) * dt X = X * k (x-x) * dt ( proceedings t substituting dt) procedures for the first cycle of a representative aircraft fired a missile, the second for representatives of aircraft missiles found after doing sinusoidal movement to try to escape. Summary : key tracking model is to use iterative equation Y Y = k * (y-Y) * dt tracers to determine the coordinates of movement, and X = X *
Platform: |
Size: 803 |
Author: 白小欣 |
Hits:
Description: 一款接球游戏,游戏中使用DirectX 7,图形较为流畅,每秒高达50桢。具有较高的计算机人工智能.英文介绍:DX pong is a neat pong game that uses DirectX 7. I wrote it in just one day and the graphics are smooth - over 50 fps! There are sound FX too, but the best thing about the game is the computer AI. It doesn t simply chase the ball, it predicts the balls path even if it is going to bounce of several walls and moves accordingly. Clever AI doesn t mean it is impossible to beat - it means it acts like a human player making the game more fun. So - have fun!-DX pong is a neat pong game that uses DirectX 7. I wrote it in just one day and the graphics are smooth- over 50 fps! There are sound FX too, but the best thing about the game is the computer AI. It doesn t simply chase the ball, it predicts the balls path even if it is going to bounce of several walls and moves accordingly. Clever AI doesn t mean it is impossible to beat- it means it acts like a human player making the game more fun. So- have fun!
Platform: |
Size: 262144 |
Author: 刘德小花 |
Hits:
Description: 一. 追踪模型
以(x , y)代表飞机的坐标,v代表飞机的速度;以(X ,Y)代表导弹的坐标,u代表导弹的速度。
由于导弹时刻指向飞机,故有
dY/dX=(y-Y)/(x-X)
记k=u/sqrt((y-Y)*(y-Y)+(x-X)*(x-X))
则有
dY/dt=k(y-Y) dX/dt=k(x-X)
故有叠代方程
Y=Y+k*(y-Y)*dt
X=X+k*(x-X)*dt (程序中以t代dt)
程序中第一个for循环代表发射导弹打飞机,第二个for代表飞机发现导弹后做正弦运动试图逃跑。
小结:
追踪模型中关键是利用叠代方程 Y=Y+k*(y-Y)*dt 确定追踪者的运动坐标,这样,不
X=X+k*(x-X)*dt
论被追踪者做何种运动,都可利用该叠代方程找出追踪者的运动轨迹(注意追踪者的速度应大于被追踪者的速度)。
-one. Track model (x, y) coordinates of the aircraft representatives, representatives v the speed of aircraft; A (X, Y), on behalf of the coordinates of missile, u representative of the speed of the missile. As the aircraft missile at times, it is dY/dX = (y-Y)/(x-X) recorded k = u/sqrt ((y-Y)* (y-Y) (x-x)* (x-X) ) have curves/dt = k (y-Y) dX/dt = k (x-X) there is an iterative equation Y Y = k* (y-Y)* dt X = X* k (x-x)* dt ( proceedings t substituting dt) procedures for the first cycle of a representative aircraft fired a missile, the second for representatives of aircraft missiles found after doing sinusoidal movement to try to escape. Summary : key tracking model is to use iterative equation Y Y = k* (y-Y)* dt tracers to determine the coordinates of movement, and X = X*
Platform: |
Size: 1024 |
Author: 白小欣 |
Hits:
Description: 使用DX来对TGA文件进行读取,遍历处理,并存成TGA的程序,涉及到对纹理的lock和unlock,自动得到文件夹下的某类型文件,操作文件的属性(如去除只读),拷贝文件等功能。-This source code reads the tga files to do some kind of operation, and then save this tga. It contains the function of lock&unlock of texture, modify the attributes of files, obtain some kind of files of one directory, and copy oprations.
Platform: |
Size: 481280 |
Author: junmoran |
Hits:
Description: 基于matlab的倒立摆控制问题的数学建模-function dx = cartpole_model(t,x,flag,u)
Platform: |
Size: 1024 |
Author: xueguoying |
Hits:
Description: 用帧差分可以检测场景变化,一个简单帧差分可通过计算两个连续帧的象素获得。对帧内每个象素点(x,y),T时刻与T-1时刻象素值之差为Dx,y(T)=||Sx,y(T) – Sx,y(T-1)||。设定内帧差分系数IDsum=ΣL , IF ||Sx,y(T) – Sx,y(T-1)||≥Ta THEN L=TRUE,实际决定是否报警,可以通过计算三帧以上IDsum数量-Frame difference can be detected with the scene changes, a simple frame difference of two consecutive frames can be calculated to obtain the pixel. Right frame of each pixel (x, y), T and T-1 time point pixel value difference of Dx, y (T) = | | Sx, y (T)- Sx, y (T-1 ) | |. Set within the frame differential coefficient IDsum = ΣL, IF | | Sx, y (T)- Sx, y (T-1) | | ≥ Ta THEN L = TRUE, the actual decision of whether or alarm, you can calculate the number of three or more IDsum
Platform: |
Size: 129024 |
Author: zoubinbin |
Hits:
Description: Otsu算法步骤如下:
设图象包含L个灰度级(0,1…,L-1),灰度值为i的的象素点数为Ni ,图象总的象素点数为N=N0+N1+...+N(L-1)。灰度值为i的点的概率为:
P(i) = N(i)/N.
门限t将整幅图象分为暗区c1和亮区c2两类,则类间方差σ是t的函数:
σ=a1*a2(u1-u2)^2 (2)
式中,aj 为类cj的面积与图象总面积之比,a1 = sum(P(i)) i->t, a2 = 1-a1 uj为类cj的均值,u1 = sum(i*P(i))/a1 0->t,
u2 = sum(i*P(i))/a2, t+1->L-1
该法选择最佳门限t^ 使类间方差最大,即:
令Δu=u1-u2,σb = max{a1(t)*a2(t)Δu^2}-int otsu (IplImage*image, int rows, int cols, int x0, int y0, int dx, int dy, int vvv)
{
unsigned char*np // 图像指针
int thresholdValue=1 // 阈值
int ihist[256] // 图像直方图,256个点
int i, j, k // various counters
int n, n1, n2, gmin, gmax
double m1, m2, sum, csum, fmax, sb
·····
Platform: |
Size: 1549312 |
Author: 燕子一舞 |
Hits:
Description: he form of the Burgers equation considered here is:
du du d^2 u
-- + u * -- = nu * -----
dt dx dx^2
for -1.0 < x < +1.0, and 0.0 < t.
Initial conditions are u(x,0) = - sin(pi*x). Boundary conditions are u(-1,t) = u(+1,t) = 0. The viscosity parameter nu is taken to be 0.01 / pi, although this is not essential.
The authors note an integral representation for the solution u(x,t), and present a better version of the formula that is amenable to approximation using Hermite quadrature.
This program library does little more than evaluate the exact solution at a user-specified set of points, using the quadrature rule. Internally, the order of this quadrature rule is set to 8, but the user can easily modify this value if greater accuracy is desired. -he form of the Burgers equation considered here is:
du du d^2 u
-- + u * -- = nu * -----
dt dx dx^2
for -1.0 < x < +1.0, and 0.0 < t.
Initial conditions are u(x,0) = - sin(pi*x). Boundary conditions are u(-1,t) = u(+1,t) = 0. The viscosity parameter nu is taken to be 0.01 / pi, although this is not essential.
The authors note an integral representation for the solution u(x,t), and present a better version of the formula that is amenable to approximation using Hermite quadrature.
This program library does little more than evaluate the exact solution at a user-specified set of points, using the quadrature rule. Internally, the order of this quadrature rule is set to 8, but the user can easily modify this value if greater accuracy is desired.
Platform: |
Size: 1024 |
Author: alicethe |
Hits:
Description: 利用DEBUG系统的A和T两指令编程将十六进制数3F56H分别送给AX、BX、CX、DX四个寄存器
采用立即数寻址方式将该数分别送给AX寄存器,再采用寄存器寻址方式将该数送给CX、 DX 三个寄存器。-A and T and programming instructions using DEBUG system hexadecimal number 3F56H are then given to the AX, BX, CX, DX, four registers
The immediate addressing mode of the number are then given to the AX register, and then the number sent to the CX, DX registers using register addressing mode.
Platform: |
Size: 252928 |
Author: 许 |
Hits:
Description: function [ue,un]=LW_utux0(v,dt,t)
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = 1, x≤0
= 0, x>0.
边界条件为:
u(-1,t)=1,u(1,t)=0.
本题要求:
使用Lax-Windroff method,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像-function [ue, un] = LW_utux0 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = 1, x ≤ 0 = 0, x> 0 boundary conditions: u (-1, t) = 1, u (1, t) = 0 of the questions requires: using the Lax-Windroff method, select v =.. 0.5, calculate and draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when input: v- that is a* dt/dx dt- time step numerical format t- of output required time solution: ue- 1N exact solution matrix at time t un- 1N value at time t when the solution matrix output image: and numerical solutions precise image
Platform: |
Size: 1024 |
Author: kingofhevil |
Hits:
Description: function [ue,un]=LW_utux0_2(v,dt,t)
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = exp[-10(4x-1)^2]
边界条件为:
u(-1,t)=0,u(1,t)=0.
本题要求:
使用Lax-Windroff格式,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像-function [ue, un] = LW_utux0_2 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = exp [- 10 (4x-1) ^ 2] of the boundary conditions: u (-1, t) = 0, u (1, t) = 0 of the required title: using the Lax-Windroff format, select v = 0.5, calculate and draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when input: v- that is a* dt/dx dt-- the time-step numerical format t- the time to be solved Output: ue- 1N exact solution at time t matrix un- 1N numerical solution matrix of the output image at time t : image and numerical solutions of the exact solution
Platform: |
Size: 1024 |
Author: kingofhevil |
Hits:
Description: function un=LW_utux0_3(dx,t)
Burgers equation:
ut + (1/2*u^2)x = 0
初始条件为:
u(x,0) = exp[-10(4x-1)^2]
边界条件为:
u(0,t)=0,u(1,t)=0
本题要求:
使用Lax-Windroff格式,选择 dx=0.01, 计算并画出当
t=0.15,和t=0.3时的数值解
输入:
dx--数值格式的x轴上的分割
r--r=dt/dx,本题预设r=0.5
t--要求解的时间
输出:
un--在时间t时的1×N数值解矩阵
输出图像:
数值解的图像-function un = LW_utux0_3 (dx, t) Burgers equation: ut+ (1/2* u ^ 2) x = 0 Initial conditions: u (x, 0) = exp [-10 (4x- 1) ^ 2] boundary conditions: u (0, t) = 0, u (1, t) = 0 of the questions asked: using the Lax-Windroff format, select dx = 0.01, calculated and drawn as t = 0.15, and t = 0.3 of the numerical solution of input: dx- x-axis numerical format partition r- r = dt/dx, the title by default r = 0.5 t- to be solved Time Output: un- 1N numerical solution matrix of the output image at time t: Numerical Solution of the image
Platform: |
Size: 1024 |
Author: kingofhevil |
Hits:
Description: function [ue,un]=UPW_utux0(v,dt,t)
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = 1, x≤0
0, x>0.
边界条件为:
u(-1,t)=1,u(1,t)=0.
本题要求:
使用迎风格式,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像-function [ue, un] = UPW_utux0 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = 1, x ≤ 0 0, x> 0 boundary conditions: u (-1, t) = 1, u (1, t) = 0 of the questions asked: using the upwind scheme, choose v = 0.5, calculated. and draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when the input: v- that is, a* dt/dx dt- time step numerical format t- the time to be solved Output: ue- 1N exact solution at time t matrix un- numerical solution 1N matrix of the output image at time t is: Image accuracy and numerical solutions of
Platform: |
Size: 1024 |
Author: kingofhevil |
Hits:
Description: function [ue,un]=UPW_utux0_2(v,dt,t)
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = exp[-10(4x-1)^2]
边界条件为:
u(-1,t)=0,u(1,t)=0.
本题要求:
使用迎风格式,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像
-function [ue, un] = UPW_utux0_2 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = exp [- 10 (4x-1) ^ 2] boundary conditions: u (-1, t) = 0, u (1, t) = 0 of the questions asked: using the upwind scheme, choose v = 0.5, calculated and Draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when input: v- that is a* dt/dx dt- Value Time Format step t- the time to be solved Output: ue- 1N exact solution of the matrix at time t un- 1N value at time t solution matrix output image: image exact solution and the numerical solution
Platform: |
Size: 1024 |
Author: kingofhevil |
Hits:
Description: 应用matlab求解线性随机微分方程dx(t)=sin(x(t))+sigma*dB(t)的输出结果。-generates outcomes of solutions of the SDE dx(t)=sin(x(t))+sigma*dB(t)
Platform: |
Size: 1024 |
Author: Lilin |
Hits:
Description: 3DS FILE TOOLKIT
This is known as the Unity 3D Sac
3D photo wall, only use the Safar
Reconstruction of multi-slice 3D
The vega a classic example of the
Display software vega learning, i
Draw a three-dimensional map of t
The DX C++ library, good-DX C poo
Of scattered point cloud the K ne
PRT, can read 3DS file to use LIB
The program modify NeHeGL Le
vtk entry procedures, suitable fo- 3DS FILE TOOLKIT
This is known as the Unity 3D Sac
3D photo wall, only use the Safar
Reconstruction of multi-slice 3D
The vega a classic example of the
Display software vega learning, i
Draw a three-dimensional map of t
The DX C++ library, good-DX C poo
Of scattered point cloud the K ne
PRT, can read 3DS file to use LIB
The program modify NeHeGL Le
vtk entry procedures, suitable fo
Platform: |
Size: 12288 |
Author: distortions |
Hits:
Description: mpi fortran wave equation solver code
!cc MAIN is the main program for WAVE_MPI.
!c
!c Discussion:
!c
!c WAVE_MPI solves the wave equation in parallel using MPI.
!c
!c Discretize the equation for u(x,t):
!c d^2 u/dt^2 - c^2 * d^2 u/dx^2 = 0 for 0 < x < 1, 0 < t
!c with boundary conditions:
!c u(0,t) = u0(t) = sin ( 2 * pi * ( 0 - c * t ) )
!c u(1,t) = u1(t) = sin ( 2 * pi * ( 1 - c * t ) )
!c and initial conditions:
!c u(x,0) = g(x,t=0) = sin ( 2 * pi * ( x - c * t ) )
!c dudt(x,0) = h(x,t=0) = - 2 * pi * c * cos ( 2 * pi * ( x - c * t ) )
!c
!c by:
!c
!c alpha = c * dt / dx.
!c
!c U(x,t+dt) = 2 U(x,t) - U(x,t-dt)
!c + alpha^2 ( U(x-dx,t) - 2 U(x,t) + U(x+dx,t) ).
!c
!c Licensing:
!c
!c This code is distributed under the GNU LGPL license.
!c
!c Modified:
!c
!c 17 November 2013
!c
!c Author:
!c
reza-mpi fortran wave equation solver code
!cc MAIN is the main program for WAVE_MPI.
!c
!c Discussion:
!c
!c WAVE_MPI solves the wave equation in parallel using MPI.
!c
!c Discretize the equation for u(x,t):
!c d^2 u/dt^2 - c^2 * d^2 u/dx^2 = 0 for 0 < x < 1, 0 < t
!c with boundary conditions:
!c u(0,t) = u0(t) = sin ( 2 * pi * ( 0 - c * t ) )
!c u(1,t) = u1(t) = sin ( 2 * pi * ( 1 - c * t ) )
!c and initial conditions:
!c u(x,0) = g(x,t=0) = sin ( 2 * pi * ( x - c * t ) )
!c dudt(x,0) = h(x,t=0) = - 2 * pi * c * cos ( 2 * pi * ( x - c * t ) )
!c
!c by:
!c
!c alpha = c * dt / dx.
!c
!c U(x,t+dt) = 2 U(x,t) - U(x,t-dt)
!c + alpha^2 ( U(x-dx,t) - 2 U(x,t) + U(x+dx,t) ).
!c
!c Licensing:
!c
!c This code is distributed under the GNU LGPL license.
!c
!c Modified:
!c
!c 17 November 2013
!c
!c Author:
!c
reza
Platform: |
Size: 4096 |
Author: reza |
Hits: