Редактирование: Particles chain with V-model interaction
Внимание! Вы не авторизовались на сайте. Ваш IP-адрес будет публично видимым, если вы будете вносить любые правки. Если вы войдёте или создадите учётную запись, правки вместо этого будут связаны с вашим именем пользователя, а также у вас появятся другие преимущества.
Правка может быть отменена. Пожалуйста, просмотрите сравнение версий, чтобы убедиться, что это именно те изменения, которые вас интересуют, и нажмите «Записать страницу», чтобы изменения вступили в силу.
Текущая версия | Ваш текст | ||
Строка 1: | Строка 1: | ||
− | |||
[[The virtual laboratory]] > [[Particles chain with V-model interaction]] <HR> | [[The virtual laboratory]] > [[Particles chain with V-model interaction]] <HR> | ||
Строка 7: | Строка 6: | ||
The model is described by the following formulas: | The model is described by the following formulas: | ||
− | [[ | + | [[Файл:Fig2_single_bond.png|350px|thumb|right| Interaction of two particles]] |
Interaction force: | Interaction force: | ||
Строка 20: | Строка 19: | ||
<math>\mathbf{M_{tb}} = B_3 \mathbf{n_{j1}} \times \mathbf{n_{i1}} - \frac{B_4}{2}(\mathbf{n_{j2}}\times \mathbf{n_{i2}}+\mathbf{n_{j3}}\times \mathbf{n_{i3}}) </math> | <math>\mathbf{M_{tb}} = B_3 \mathbf{n_{j1}} \times \mathbf{n_{i1}} - \frac{B_4}{2}(\mathbf{n_{j2}}\times \mathbf{n_{i2}}+\mathbf{n_{j3}}\times \mathbf{n_{i3}}) </math> | ||
− | Where <math>B_1</math>, <math>B_2</math>, <math>B_3</math> | + | Where <math>B_1</math>, <math>B_2</math>, <math>B_3</math> и <math>B_4</math> - various coefficients which are characteristics of system. |
== Description of realization of a chain == | == Description of realization of a chain == | ||
− | [[ | + | [[Файл: Fig3_bond_def.png|600px|thumb|right|Types of deformations]] |
In the program three various boundary conditions which can are realized chosen as the user: | In the program three various boundary conditions which can are realized chosen as the user: | ||
Строка 67: | Строка 66: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | + | Файл '''"V-model.js"''' | |
<syntaxhighlight lang="javascript" line start="1" enclose="div"> | <syntaxhighlight lang="javascript" line start="1" enclose="div"> | ||
function MainParticle(canvas) { | function MainParticle(canvas) { | ||
− | // | + | // Предварительные установки |
− | var context = canvas.getContext("2d"); // | + | var context = canvas.getContext("2d"); // на context происходит рисование |
− | // | + | // Задание констант |
− | const Pi = 3.1415926; // " | + | const Pi = 3.1415926; // число "пи" |
− | const m0 = 1; // | + | const m0 = 1; // масштаб массы |
− | const T0 = 1; // | + | const T0 = 1; // масштаб времени (период колебаний исходной системы) |
− | const a0 = 1; // | + | const a0 = 1; // масштаб расстояния (диаметр шара) |
− | const g0 = a0 / T0 / T0; // | + | const g0 = a0 / T0 / T0; // масштаб ускорения (ускорение, при котором за T0 будет пройдено расстояние a0) |
− | const k0 = 2 * Pi / T0; // | + | const k0 = 2 * Pi / T0; // масштаб частоты |
− | //const C0 = m0 * k0 * k0; // | + | //const C0 = m0 * k0 * k0; // масштаб жесткости |
const C0 = 1; | const C0 = 1; | ||
− | const B0 = 2 * m0 * k0; // | + | const B0 = 2 * m0 * k0; // масштаб вязкости |
− | // *** | + | // *** Задание физических параметров *** |
− | const Ny = 5; // | + | const Ny = 5; // число шаров, помещающихся по вертикали в окно (задает размер шара относительно размера окна) |
const Nx = 5; | const Nx = 5; | ||
− | const m = 1 * m0; // | + | const m = 1 * m0; // масса |
− | const Cwall = 10 * C0; // | + | const Cwall = 10 * C0; // жесткость стен |
− | //const B = 0.01 * B0; // | + | //const B = 0.01 * B0; // вязкость среды |
const B = 0; | const B = 0; | ||
− | const B1 = 0.03 * B0; // | + | const B1 = 0.03 * B0; // вязкость на стенках |
//const B1 = 0; | //const B1 = 0; | ||
− | //var mg = 0.25 * m * g0; // | + | //var mg = 0.25 * m * g0; // сила тяжести |
− | const r = 0.5 * a0; // | + | const r = 0.5 * a0; // радиус частицы в расчетных координатах |
− | var stiff = 1 * C0; // " | + | var stiff = 1 * C0; // "жесткость" пружинки |
var vx0 = 0 * a0/T0; | var vx0 = 0 * a0/T0; | ||
Строка 102: | Строка 101: | ||
//Text_vx0.value = vx0; | //Text_vx0.value = vx0; | ||
− | // *** | + | // *** Параметры системы *** |
− | var c = 1;// | + | var c = 1;// жесткость |
− | var n = 10;// | + | var n = 10;// количество частиц |
var c_a = 100//1;//longitudinal | var c_a = 100//1;//longitudinal | ||
var c_d = 100//c_a*1;//shear | var c_d = 100//c_a*1;//shear | ||
Строка 111: | Строка 110: | ||
var J = 1; | var J = 1; | ||
var m_0 = 1.5; | var m_0 = 1.5; | ||
− | var f = 0 ;// | + | var f = 0 ;//вариант либо свободное тело, либо закрепелнный край |
var ugol = 0; | var ugol = 0; | ||
var sm_x = 0; | var sm_x = 0; | ||
Строка 117: | Строка 116: | ||
− | // *** | + | // *** Задание вычислительных параметров *** |
− | const fps = 50; // frames per second - | + | const fps = 50; // frames per second - число кадров в секунду (качеcтво отображения)50 |
− | const spf = 10;//5; // steps per frame - | + | const spf = 10;//5; // steps per frame - число шагов интегрирования между кадрами (скорость расчета) |
− | const dt = 1 * T0 / fps; // | + | const dt = 1 * T0 / fps; // шаг интегрирования |
− | // | + | // Задание констант для рисования |
− | const scale =100* canvas.height / Ny / a0; // | + | const scale =100* canvas.height / Ny / a0; // масштабный коэффициент для перехода от расчетных к экранным координатам |
− | var w = canvas.width / scale; // | + | var w = canvas.width / scale; // ширина окна в расчетных координатах |
− | var h = canvas.height / scale; // | + | var h = canvas.height / scale; // высота окна в расчетных координатах |
var k1v; var k2v; var k3v; var k4v; var k1x; var k2x; var k3x; var k4x; | var k1v; var k2v; var k3v; var k4v; var k1x; var k2x; var k3x; var k4x; | ||
var T1;var T2; var T1_; var T2_; | var T1;var T2; var T1_; var T2_; | ||
Строка 139: | Строка 138: | ||
var B_3 = c_b - B_2/4 - B_4/2; | var B_3 = c_b - B_2/4 - B_4/2; | ||
− | // ------------------------------- | + | // ------------------------------- Выполнение программы ------------------------------------------ |
− | // | + | // Добавление шара |
− | balls=[]// | + | balls=[]//массив содержащий частицы |
j=1; | j=1; | ||
for (i = 0;i<n/2;i++) | for (i = 0;i<n/2;i++) | ||
Строка 148: | Строка 147: | ||
var b1 = []; | var b1 = []; | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = 0*j; // | + | b.fi_x = 0*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; // | + | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; // расчетные координаты шара |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = 0*j; // | + | b1.fi_x = 0*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // | + | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
} | } | ||
− | // | + | // Основной цикл программы |
− | setInterval(control, 1500 / fps); // | + | setInterval(control, 1500 / fps); // функция control вызывается с периодом, определяемым вторым параметром |
// --------------------------------------------------------------------------------------------------------------------- | // --------------------------------------------------------------------------------------------------------------------- | ||
− | // --------------------------------- | + | // --------------------------------- Определение всех функций ----------------------------------- |
// --------------------------------------------------------------------------------------------------------------------- | // --------------------------------------------------------------------------------------------------------------------- | ||
− | // | + | // основная функция, вызываемая в программе |
function control() | function control() | ||
{ | { | ||
− | physics(); // | + | physics(); // делаем spf шагов интегрирование |
− | draw(); // | + | draw(); // рисуем частицу |
} | } | ||
− | //======================= | + | //=======================новое задание начального состояния |
− | function rebild()// | + | function rebild()//новое задание начального состояния |
{ | { | ||
time = 1; | time = 1; | ||
Строка 195: | Строка 194: | ||
var b1 = []; | var b1 = []; | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = 0*j; // | + | b.fi_x = 0*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; // | + | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; // расчетные координаты шара |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = 0*j; // | + | b1.fi_x = 0*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // | + | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 217: | Строка 216: | ||
context.clearRect(0, 0, w * scale, h * scale); | context.clearRect(0, 0, w * scale, h * scale); | ||
} | } | ||
− | //======================= | + | //=======================Выбор типа задачи====================== |
− | radio_pic_1.onchange = function() {f = 0;rebild();};// | + | radio_pic_1.onchange = function() {f = 0;rebild();};//свободное тело |
− | radio_pic_2.onchange = function() {f = 1;rebild();};// | + | radio_pic_2.onchange = function() {f = 1;rebild();};//закрепленный край |
− | radio_pic_3.onchange = function() {f = 2;rebild();};// | + | radio_pic_3.onchange = function() {f = 2;rebild();};//закрепелнные края |
− | // | + | // Реакция на изменение значения в чекбоксе |
this.new_start = function() | this.new_start = function() | ||
Строка 239: | Строка 238: | ||
var b1 = []; | var b1 = []; | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = ugol*j; // | + | b.fi_x = ugol*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // | + | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 272: | Строка 271: | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = ugol*j; // | + | b.fi_x = ugol*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // | + | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 304: | Строка 303: | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = 10*j; // | + | b.fi_x = 10*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.00; // | + | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.00; // расчетные координаты шара |
+ | |||
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = 10*j; // | + | b1.fi_x = 10*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // | + | b1.x = (w / 2)+diag*(2*i+1)*1.0; b1.y = h / 2 ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 336: | Строка 336: | ||
var time = 1; | var time = 1; | ||
− | b.fi_x = ugol*j; // | + | b.fi_x = ugol*j; //угол с осью ОХ |
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
j=j*(-1); | j=j*(-1); | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
− | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // | + | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; // расчетные координаты шара |
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 373: | Строка 373: | ||
b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | ||
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
break; | break; | ||
case 1: | case 1: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление края |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
b.fi_x = 0; | b.fi_x = 0; | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
Строка 387: | Строка 387: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
case 2: | case 2: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление краев |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
Строка 404: | Строка 404: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
} | } | ||
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
b.omega=0; | b.omega=0; | ||
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 444: | Строка 444: | ||
b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | ||
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
break; | break; | ||
case 1: | case 1: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление края |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
b.fi_x = 0; | b.fi_x = 0; | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
Строка 458: | Строка 458: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
case 2: | case 2: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление краев |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
Строка 475: | Строка 475: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
} | } | ||
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 514: | Строка 514: | ||
b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); | ||
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
break; | break; | ||
case 1: | case 1: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление края |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
b.fi_x = 0; | b.fi_x = 0; | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
Строка 528: | Строка 528: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
case 2: | case 2: | ||
− | if (i ==((n/2)-1))// | + | if (i ==((n/2)-1))//закрепление краев |
{ | { | ||
b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | b.x = (w / 2)-diag*(2*i+1)*1.0; b.y = h / 2.0; | ||
Строка 545: | Строка 545: | ||
{ | { | ||
b.fi_x = ugol*j; | b.fi_x = ugol*j; | ||
− | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // | + | b.x = (w / 2)-diag*(2*i+1)*(1.0+sm_x/100); b.y = h / (2.00+sm_y/100); // расчетные координаты шара |
j=j*(-1); | j=j*(-1); | ||
− | b1.fi_x = ugol*j; // | + | b1.fi_x = ugol*j; //угол с осью ОХ |
b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | b1.x = (w / 2)+diag*(2*i+1)*(1.0+sm_x/100); b1.y = h / (2.00-sm_y/100) ; | ||
} | } | ||
break; | break; | ||
} | } | ||
− | b.omega=0;// | + | b.omega=0;//угловая скорость |
− | var dx = diag*Math.cos(b.fi_x*Math.PI/180);// | + | var dx = diag*Math.cos(b.fi_x*Math.PI/180);//смещение для рисования. |
b.Fx=0;b.Fy=0; | b.Fx=0;b.Fy=0; | ||
b.x_ = b.x; b.y_ = b.y; | b.x_ = b.x; b.y_ = b.y; | ||
− | b.fx = 0; b.fy = 0; // | + | b.fx = 0; b.fy = 0; // сила, действующая на шар |
− | b.vx = vx0; b.vy = vy0; // | + | b.vx = vx0; b.vy = vy0; // начальная скорость |
b1.omega=0; | b1.omega=0; | ||
b1.Fx=0;b1.Fy=0; | b1.Fx=0;b1.Fy=0; | ||
b1.x_ = b.x; b1.y_ = b.y; | b1.x_ = b.x; b1.y_ = b.y; | ||
− | b1.fx = 0; b1.fy = 0; // | + | b1.fx = 0; b1.fy = 0; // сила, действующая на шар |
− | b1.vx = vx0; b1.vy = vy0; // | + | b1.vx = vx0; b1.vy = vy0; // начальная скорость |
balls[n/2-(i+1)]=b;//[2*i] | balls[n/2-(i+1)]=b;//[2*i] | ||
balls[n/2+(i)] = b1;//[2*i+1] | balls[n/2+(i)] = b1;//[2*i+1] | ||
Строка 569: | Строка 569: | ||
context.clearRect(0, 0, w * scale, h * scale); | context.clearRect(0, 0, w * scale, h * scale); | ||
}; | }; | ||
− | // | + | // Функция, делающая spf шагов интегрирования |
function physics() | function physics() | ||
− | { // | + | { // то, что происходит каждый шаг времени |
− | for (var s = 1; s <= spf; s++) // | + | for (var s = 1; s <= spf; s++) //шаги интегрирования |
{ | { | ||
Строка 604: | Строка 604: | ||
var beta_y=0.01//0.1; | var beta_y=0.01//0.1; | ||
//console.log(c_b); | //console.log(c_b); | ||
− | if (f==0)// | + | if (f==0)//совбодное тело |
{ | { | ||
x_v1=balls[i].vx; | x_v1=balls[i].vx; | ||
Строка 628: | Строка 628: | ||
asd=balls[0].fx+balls[1].fx; | asd=balls[0].fx+balls[1].fx; | ||
} | } | ||
− | else// | + | else//закрепелнный край |
{ | { | ||
− | if (f==1)//// | + | if (f==1)////закрепелнный край |
{ | { | ||
balls[i] = b; | balls[i] = b; | ||
Строка 656: | Строка 656: | ||
} | } | ||
} | } | ||
− | else // | + | else //оба края закрепелены |
{ | { | ||
Строка 691: | Строка 691: | ||
} | } | ||
} | } | ||
− | // | + | // определение функции, вычисляющей силу |
− | // | + | // определение функции, рисующией частицу, стенки и пр |
− | context.fillStyle = "#3070d0"; // | + | context.fillStyle = "#3070d0"; // цвет |
− | //=================================== | + | //===================================Взаимодествие мышью======================== |
− | // | + | // функция запускается при нажатии клавиши мыши |
canvasBalls.onmousedown = function(e) { | canvasBalls.onmousedown = function(e) { | ||
− | var m = mouseCoords(e); // | + | var m = mouseCoords(e); // получаем координаты курсора мыши |
switch (f) | switch (f) | ||
{ | { | ||
case(0): | case(0): | ||
− | var x = balls[n-1].x - m.x/scale; // | + | var x = balls[n-1].x - m.x/scale; // расстояние от центра шара до курсора по оси x |
− | var y = balls[n-1].y - m.y/scale; // | + | var y = balls[n-1].y - m.y/scale; // расстояние от центра шара до курсора по оси y |
− | var rLen2 = x * x + y * y; // | + | var rLen2 = x * x + y * y; // квадрат расстояния между курсором и центром шара |
− | if (rLen2 <= diag*diag) { // | + | if (rLen2 <= diag*diag) { // если курсор нажал на шар |
− | xShift = balls[n-1].x - m.x/scale; // | + | xShift = balls[n-1].x - m.x/scale; // сдвиг курсора относительно центра шара по x |
− | yShift = balls[n-1].y - m.y/scale; // | + | yShift = balls[n-1].y - m.y/scale; // сдвиг курсора относительно центра шара по y |
− | canvasBalls.onmousemove = mouseMove; // | + | canvasBalls.onmousemove = mouseMove; // пока клавиша нажата - работает функция перемещения |
} | } | ||
break; | break; | ||
case(1): | case(1): | ||
− | var x = balls[n-1].x - m.x/scale; // | + | var x = balls[n-1].x - m.x/scale; // расстояние от центра шара до курсора по оси x |
− | var y = balls[n-1].y - m.y/scale; // | + | var y = balls[n-1].y - m.y/scale; // расстояние от центра шара до курсора по оси y |
− | var rLen2 = x * x + y * y; // | + | var rLen2 = x * x + y * y; // квадрат расстояния между курсором и центром шара |
− | if (rLen2 <= diag*diag) { // | + | if (rLen2 <= diag*diag) { // если курсор нажал на шар |
− | xShift = balls[n-1].x - m.x/scale; // | + | xShift = balls[n-1].x - m.x/scale; // сдвиг курсора относительно центра шара по x |
− | yShift = balls[n-1].y - m.y/scale; // | + | yShift = balls[n-1].y - m.y/scale; // сдвиг курсора относительно центра шара по y |
− | canvasBalls.onmousemove = mouseMove; // | + | canvasBalls.onmousemove = mouseMove; // пока клавиша нажата - работает функция перемещения |
} | } | ||
break; | break; | ||
case (2): | case (2): | ||
case(0): | case(0): | ||
− | var x = balls[n/2].x - m.x/scale; // | + | var x = balls[n/2].x - m.x/scale; // расстояние от центра шара до курсора по оси x |
− | var y = balls[n/2].y - m.y/scale; // | + | var y = balls[n/2].y - m.y/scale; // расстояние от центра шара до курсора по оси y |
− | var rLen2 = x * x + y * y; // | + | var rLen2 = x * x + y * y; // квадрат расстояния между курсором и центром шара |
− | if (rLen2 <= diag*diag) { // | + | if (rLen2 <= diag*diag) { // если курсор нажал на шар |
− | xShift = balls[n/2].x - m.x/scale; // | + | xShift = balls[n/2].x - m.x/scale; // сдвиг курсора относительно центра шара по x |
− | yShift = balls[n/2].y - m.y/scale; // | + | yShift = balls[n/2].y - m.y/scale; // сдвиг курсора относительно центра шара по y |
− | canvasBalls.onmousemove = mouseMove; // | + | canvasBalls.onmousemove = mouseMove; // пока клавиша нажата - работает функция перемещения |
} | } | ||
break; | break; | ||
Строка 735: | Строка 735: | ||
}; | }; | ||
− | // | + | // функция запускается при отпускании клавиши мыши |
document.onmouseup = function() { | document.onmouseup = function() { | ||
− | canvasBalls.onmousemove = null; // | + | canvasBalls.onmousemove = null; // когда клавиша отпущена - функции перемещения нету |
}; | }; | ||
− | // | + | // функция запускается при перемещении мыши (много раз, в каждый момент перемещения) |
− | // | + | // в нашем случае работает только с зажатой клавишей мыши |
function mouseMove(e) { | function mouseMove(e) { | ||
switch (f) | switch (f) | ||
{ | { | ||
case(0): | case(0): | ||
− | var m = mouseCoords(e); // | + | var m = mouseCoords(e); // получаем координаты курсора мыши |
balls[n-1].x = m.x/scale + xShift; | balls[n-1].x = m.x/scale + xShift; | ||
balls[n-1].y = m.y/scale+ yShift; | balls[n-1].y = m.y/scale+ yShift; | ||
Строка 760: | Строка 760: | ||
console.log(m.x/scale); | console.log(m.x/scale); | ||
//console.log(r_nach); | //console.log(r_nach); | ||
− | if (Math.abs(r_m)<(3*diag)) // | + | if (Math.abs(r_m)<(3*diag)) // получаем координаты курсора мыши |
{pr_x = m.x/scale + xShift*0.01 -balls[n-1].x; | {pr_x = m.x/scale + xShift*0.01 -balls[n-1].x; | ||
pr_y = m.y/scale+yShift-balls[n-1].y; | pr_y = m.y/scale+yShift-balls[n-1].y; | ||
Строка 769: | Строка 769: | ||
break; | break; | ||
case(2): | case(2): | ||
− | var m = mouseCoords(e); // | + | var m = mouseCoords(e); // получаем координаты курсора мыши |
+ | balls[n/2].x = m.x/scale + xShift; | ||
balls[n/2].y = m.y/scale+ yShift; | balls[n/2].y = m.y/scale+ yShift; | ||
draw(); | draw(); | ||
Строка 776: | Строка 777: | ||
} | } | ||
− | // | + | // функция возвращает координаты курсора мыши |
function mouseCoords(e) { | function mouseCoords(e) { | ||
var m = []; | var m = []; | ||
Строка 794: | Строка 795: | ||
function draw() | function draw() | ||
{ | { | ||
− | context.clearRect(0, 0, w * scale, h * scale); // | + | context.clearRect(0, 0, w * scale, h * scale); // очистить экран |
for (var i =0;i<n;i++) | for (var i =0;i<n;i++) | ||
{ | { | ||
b = balls[i]; | b = balls[i]; | ||
context.beginPath(); | context.beginPath(); | ||
− | context.translate(b.x*scale,b.y * scale);// | + | context.translate(b.x*scale,b.y * scale);//перенос в центр |
context.rotate(inRad(b.fi_x-45)); | context.rotate(inRad(b.fi_x-45)); | ||
context.fillRect(-rectW/2, -rectH/2, rectW, rectH); | context.fillRect(-rectW/2, -rectH/2, rectW, rectH); | ||
context.rotate(-inRad(b.fi_x-45)); | context.rotate(-inRad(b.fi_x-45)); | ||
− | context.translate(-b.x * scale, -b.y * scale);// | + | context.translate(-b.x * scale, -b.y * scale);//перенос обратно |
context.closePath(); | context.closePath(); | ||
context.stroke(); | context.stroke(); | ||
Строка 811: | Строка 812: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Файл '''"v-model.html"''' | |
<syntaxhighlight lang="html5" line start="1" enclose="div"> | <syntaxhighlight lang="html5" line start="1" enclose="div"> | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
Строка 820: | Строка 821: | ||
</head> | </head> | ||
<body> | <body> | ||
− | <!-- | + | <!-- Добавление области для рисования частицы --> |
<canvas id="canvasBalls" width="800" height="400" style="border:1px solid #000000;"></canvas> | <canvas id="canvasBalls" width="800" height="400" style="border:1px solid #000000;"></canvas> | ||
Строка 830: | Строка 831: | ||
<!-- document.getElementById('Slider_02').value = this.value; --> | <!-- document.getElementById('Slider_02').value = this.value; --> | ||
"> | "> | ||
− | <!-- | + | <!-- Добавление слайдера --> |
<!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | <!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | ||
</I></font> | </I></font> | ||
Строка 839: | Строка 840: | ||
<!-- document.getElementById('Slider_02').value = this.value; --> | <!-- document.getElementById('Slider_02').value = this.value; --> | ||
"> | "> | ||
− | <!-- | + | <!-- Добавление слайдера --> |
<!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | <!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | ||
</I></font> | </I></font> | ||
Строка 848: | Строка 849: | ||
<!-- document.getElementById('Slider_02').value = this.value; --> | <!-- document.getElementById('Slider_02').value = this.value; --> | ||
"> | "> | ||
− | <!-- | + | <!-- Добавление слайдера --> |
<!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | <!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | ||
</I></font> | </I></font> | ||
Строка 857: | Строка 858: | ||
<!-- document.getElementById('Slider_02').value = this.value; --> | <!-- document.getElementById('Slider_02').value = this.value; --> | ||
"> | "> | ||
− | <!-- | + | <!-- Добавление слайдера --> |
<!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | <!-- <input type="range" id="Slider_02" style="width: 100px;" oninput="app.set_02(this.value); document.getElementById('Text_02').value = this.value;"> --> | ||
</I></font> | </I></font> |