Главное меню
Мы солидарны с Украиной. Узнайте здесь, как можно поддержать Украину.

Математический софт

Автор RawonaM, июля 25, 2011, 15:29

0 Пользователи и 1 гость просматривают эту тему.

Квас

Цитата: RawonaM от августа  1, 2011, 22:53
Кто-нибудь знает, как в Максиме нарисовать график уравнения, которое не функция?
Например что-нить типа х33=1.

Это уравнение неинтересное: y выражается. Пусть лучше х33-3xy=0. Строится так:

load(implicit_plot);
implicit_plot(x^3 + y^3 - 3*x*y = 0, [x, -3, 3], [y, -3, 3]);
Пишите письма! :)

Joris

Цитата: DeSha от июля 25, 2011, 20:47
Поэтому у меня python - это [rufón], ABBYY - это [abuu] и т.д. ;)
Offtop
ABBYY - это авуу, дэсу же
yóó' aninááh

RawonaM

Цитата: Квас от августа  3, 2011, 17:46
Это уравнение неинтересное: y выражается. Пусть лучше х33-3xy=0. Строится так:

load(implicit_plot);
implicit_plot(x^3 + y^3 - 3*x*y = 0, [x, -3, 3], [y, -3, 3]);
Ух ты, спасибо :)

RawonaM

Квас, а вы знаете как можно нарисовать график по полярному уравнению?

RawonaM

А есть какой-то такой софт, в котором можно играться визуально с векторами, строить плоскости, нормали, умножать друг на друга и т.п.?

DarkMax2

Tej wojny nikt za nas nie wygra! © Wiedźmin III
Коли зчинять лемент: "Хто ж знав?!" — відповімо: "Ми".

З моїх снів ти утечеш над ранок,
Терпка, як аґрус, солодка, як біз.
Хочу снить чорні локи сплута́ні,
Фіалкові очі, мокрі від сліз.

Квас

Что-то туго там с полярными, как я понимаю. Попытался нарисовать простенький график, интерпретировав полярные как параметрическое задание, но не получилось.

Я «Максиму» только установил. Надо бы разобраться, почитать какое нибудь краткое введение. (Вот, кстати, нашёл что-то.)
Пишите письма! :)

Bhudh

Цитата: маныFunction: plot2d (expr, x_range, ..., options, ...)
Function: plot2d ([expr_1, ..., expr_n], ..., options, ...)
Function: plot2d ([expr_1, ..., expr_n], x_range,..., options, ...)
Where expr, expr_1, ..., expr_n can be either expressions, or Maxima or Lisp functions or operators, or a list with the any of the forms: [discrete, [x1, ..., xn], [y1, ..., yn]], [discrete, [[x1, y1], ..., [xn, ..., yn]] or [parametric, x_expr, y_expr, t_range].

Displays a plot of one or more expressions as a function of one variable.

plot2d plots one expression expr or several expressions [name_1, ..., name_n]. The expressions that are not of the parametic or discrete types should all depend only on one variable var and it will be mandatory the use of x_range to name that variable and gives its minimum and maximum values, using the syntax: [variable, min, max]. The plot will show the horizontal axis bound by the values of min and max.

A expression to be plotted can also be given in the discrete or parametric forms. Namely, as a list starting with the word "discrete" or "parametric". The keyword discrete must be followed by two lists of values, both with the same length, which are the horizontal and vertical coordinates of a set of points; alternatively, the coordinates of each point can be put into a list with two values, and all the coordinates of the points should be inside another list. The keyword parametric must be followed by two expressions x_expr and y_expr, and a range of the form [param, min, max]. The two expressions must depend only on the parameter param, and the plot will show the path traced out by the point with coordinates (x_expr, y_expr) as param increases from min to max.

The range of the vertical axis is not mandatory. It is one more of the options for the command, with the syntax: [y, min, max]. If that option is used, the plot will show that entire range, even if the expressions do not reach all that range. Otherwise, if a vertical range is not specified by set_plot_option, the boundaries of the vertical axis will be set up automatically.

All other options should also be lists, starting with the name of the option. The option xlabel can be used to give a label for the horizontal axis; if that option is not used, the horizontal axis will be labeled with the name of the variable specified in x_range, or with the expression x_expr in the case of just one parametric expression, or it will be left blank otherwise.

A label for the vertical axis can be given with the ylabel option. If there is only one expression to be plotted and the ylabel option was not used, the vertical axis will be labeled with that expression, unless it is too large, or with the expression y_expr if the expression is parametric, or with the text "discrete data" if the expression is discrete.

The options [logx] and [logy] do not need any parameters. They will make the horizontal and vertical axes be scaled logarithmically.

If there are several expressions to be plotted, a legend will be written to identiy each of the expressions. The labels that should be used in that legend can be given with the option legend. If that option is not used, Maxima will create labels from the expressions.

By default, the expressions are plotted as a set of line segments joining adjacent points within a set of points which is either given in the discrete form, or calculated automatically from the expression given, using an algorithm that automatically adapts the steps among points using as an initial estimate of the total number of points the value set with the nticks option. The option style can be used to make one of the expressions to be represented as a set of isolated points, or as points and line segments.

There are several global options stored in the list plot_options which can be modified with the function set_plot_option; any of those global options can be overriden with options given in the plot2d command.

A function to be plotted may be specified as the name of a Maxima or Lisp function or operator, a Maxima lambda expression, or a general Maxima expression. If specified as a name or a lambda expression, the function must be a function of one argument.

We can plot a circle using a parametric plot with a parameter t. It is not necessary to give a range for the horizontal range, since the range of the parameter t determines the domain. However, since the graph's horizontal and vertical axes lengths are in the 4 to 3 proportion, we will use the xrange option to obtain the same scaling in both axes:
(%i8) plot2d ([parametric, cos(t), sin(t), [t,-%pi,%pi],
      [nticks,80]], [x, -4/3, 4/3])$


Function: make_transform (vars, fx, fy, fz)
Returns a function suitable for the transform function in plot3d. Use with the plot option transform_xy.
make_transform ([r, th, z], r*cos(th), r*sin(th), z)$
is a transformation to polar coordinates.
Пиши, что думаешь, но думай, что пишешь.
MONEŌ ERGŌ MANEŌ.
Waheeba dokin ʔebi naha.
«каждый пост в интернете имеет коэффициент бреда» © Невский чукчо

Квас

Во! Я, кстати, нарисовал потом параметрически. Можно даже функцию определить. transform_xy только для пространства работает.

У меня проблема оказалась в том, что t в качестве параметра она принимает, а phi — нет. Странно как-то. :donno:
Пишите письма! :)

RawonaM


Квас

Цитата: RawonaM от августа  5, 2011, 09:52
Цитата: Квас от августа  5, 2011, 08:34Я, кстати, нарисовал потом параметрически.
И какая команда?

Например,
plot2d([parametric, cos(3*t)*cos(t),cos(3*t)*sin(t)],[t,0,2*%pi],[nticks,120]);
изображает ρ = 3 cos φ.

Интересно, одинаковый масштаб по осям можно установить, только мышкой изменяя размер окна с графиком? :???
Пишите письма! :)

RawonaM


Квас

Цитата: RawonaM от августа  5, 2011, 10:47
А полярное как нарисовать, еще не знаете?

Я так понял, в чистом виде его и нет. Рисуется параметрически с учётом формул
[tex]<br />\left\{<br />\begin{array}{l}<br />x = r \cos \varphi\\<br />y = r \sin \varphi<br />\end{array}<br />\right.<br />[/tex]
Пишите письма! :)

RawonaM

А как нарисовать трехмерный параметрический?
plot3d просит какую-то вторую переменную:
plot3d: Usage.
To plot a single function f of 2 variables v1 and v2:
  plot3d (f, [v1, min, max], [v2, min, max], options)
A parametric representation of a surface with parameters v1 and v2:
  plot3d ([f1, f2, f3], [v1, min, max], [v2, min, max], options)
Several functions depending on the two variables v1 and v2:
  plot3d ([f1, f2, ..., fn, [v1, min, max], [v2, min, max]], options)

Но ведь параметр один.

Квас

Надо, чтобы выражение f зависело только от одного параметра, а второй указывается как дань формализму. Это я отсюда почерпнул.
Пишите письма! :)

RawonaM

Не получается.
plot3d([(1+t^3),t, t],[t,0,2*%pi],[x,0,100],[nticks,120]);
plot3d([parametric, (1+t^3),t, t],[t,0,2*%pi],[x,0,100],[nticks,120]);

Первый говорит не нашел вторую переменную, второй вообще не признает.

Квас

Пишите письма! :)

RawonaM


Bhudh

Цитата: RawonaM от августа  5, 2011, 13:56plot3d([(1+t^3),t, t],[t,0,2*%pi],[x,0,100],[nticks,120]);


Цитата: RawonaM от августа  5, 2011, 13:56plot3d([parametric, (1+t^3),t, t],[t,0,2*%pi],[x,0,100],[nticks,120]);


Что-то у тебя какая-то неправильная Максима...
Пиши, что думаешь, но думай, что пишешь.
MONEŌ ERGŌ MANEŌ.
Waheeba dokin ʔebi naha.
«каждый пост в интернете имеет коэффициент бреда» © Невский чукчо

Bhudh

А-а, у функции plot3d вообще нет параметра parametric :green:.
Он только у plot2d есть.
Пиши, что думаешь, но думай, что пишешь.
MONEŌ ERGŌ MANEŌ.
Waheeba dokin ʔebi naha.
«каждый пост в интернете имеет коэффициент бреда» © Невский чукчо

RawonaM

Цитата: Bhudh от августа  6, 2011, 07:59
Цитата: RawonaM от августа  5, 2011, 13:56plot3d([(1+t^3),t, t],[t,0,2*%pi],[x,0,100],[nticks,120]);
Цитироватьplot3d: there must be two variables; found: [t]
-- an error. To debug this try: debugmode(true);

Ты модули какие-то загружал?

Bhudh

Пиши, что думаешь, но думай, что пишешь.
MONEŌ ERGŌ MANEŌ.
Waheeba dokin ʔebi naha.
«каждый пост в интернете имеет коэффициент бреда» © Невский чукчо

arseniiv

А вот Mathematica даже старая, версии 5.0, умеет PolarPlot. А ещё мне нравится единый механизм опций для любых функций. Хоть численного интегрирования, хоть графики, хоть решения уравнений модулярно, всё записывается на сходный манер, не то что в ваших Клёнах. :P

Квас

Цитата: arseniiv от августа  6, 2011, 21:24
А вот Mathematica даже старая, версии 5.0, умеет PolarPlot.

Первое впечатление от Maxima — «программа для бедных». ;D

Цитата: arseniiv от августа  6, 2011, 21:24
А ещё мне нравится единый механизм опций для любых функций. Хоть численного интегрирования, хоть графики, хоть решения уравнений модулярно, всё записывается на сходный манер, не то что в ваших Клёнах.

Не понял.
Пишите письма! :)

Bhudh

Цитата: Квас от Первое впечатление от Maxima — «программа для бедных».
Первое оно и есть первое.
Вам что там, эластичность нужна?
Пиши, что думаешь, но думай, что пишешь.
MONEŌ ERGŌ MANEŌ.
Waheeba dokin ʔebi naha.
«каждый пост в интернете имеет коэффициент бреда» © Невский чукчо

Быстрый ответ

Обратите внимание: данное сообщение не будет отображаться, пока модератор не одобрит его.

Имя:
Имейл:
Проверка:
Оставьте это поле пустым:
Наберите символы, которые изображены на картинке
Прослушать / Запросить другое изображение

Наберите символы, которые изображены на картинке:

√36:
ALT+S — отправить
ALT+P — предварительный просмотр