PHPで作図
このページの末尾へ
図形のコピー
: 関数とグラフ
ヘルプ
ドット数(幅
高
)形式(
gif
jpg
)
set_scale($scale = 10, $org_x_percent = 30, $org_y_percent = 68); draw_xaxis($x_is_low_pos = true, $sx = -10, $ex = 4); draw_yaxis($y_is_right_pos = false, $sy = -2, $ey = 10); set_x_def_range($sx, $ex); df1_x_y($x = -4, $y = 3); draw_formula('b', $size = 12, 0, $y, $o_pos = O_POS_UP_LEFT); draw_formula('-b/a', $size = 12, $x, 0, $o_pos = O_POS_UP_LEFT); allocate_text_bgcolor('#FF9933'); draw_formula('a > 0', $size = 12, $x * 1.7, $y * 2, $o_pos = O_POS_LOW_CENTER); transparent_text_bgcolor(); draw_text('常に増加', $x, $y, $o_pos = O_POS_LOW_CENTER); set_scale($scale = 10, $org_x_percent = 68, $org_y_percent = 68); draw_xaxis($x_is_low_pos = true, $sx = -4, $ex = 10); draw_yaxis($y_is_right_pos = false, $sy = -2, $ey = 10); set_x_def_range($sx, $ex); df1_x_y($x = 4, $y = 3); draw_formula('b', $size = 12, 0, $y, $o_pos = O_POS_UP_RIGHT); draw_formula('-b/a', $size = 12, $x, 0, $o_pos = O_POS_UP_RIGHT); allocate_text_bgcolor('#99FFFF'); draw_formula('a < 0', $size = 12, $x * 1.7, $y * 2, $o_pos = O_POS_LOW_CENTER); transparent_text_bgcolor(); draw_text('常に減少', $x, $y, $o_pos = O_POS_LOW_CENTER); set_scale($scale = 10, $org_x_percent = 15, $org_y_percent = 15); draw_xaxis($x_is_low_pos = true, $sx = -4, $ex = 10); draw_yaxis($y_is_right_pos = false, $sy = -4, $ey = 10); set_x_def_range(-3, 3); allocate_color('gray'); df2_ax_p2_q($a = 1, $p = 0, $q = 0); set_x_def_range(-3 + 4, 3 + 4); $p = 4; $q = -2; $dash_y = 5; draw_dash_line($p, $sy, $p, $dash_y); allocate_color('red'); draw_circle(0, 0, $r = 0.3); draw_circle($p, $q, $r = 0.3); set_thick($thick = 3); draw_line(0, 0, $p, 0); draw_line($p, 0, $p, $q); set_thick($thick = 1); draw_arrow_head(0, 0, $p, 0); draw_arrow_head($p, 0, $p, $q); allocate_color('black'); df2_ax_p2_q($a = 1, $p, $q); allocate_text_bgcolor('#FF9933'); draw_formula('a > 0', $size = 12, $ex , $ey, $o_pos = O_POS_UP_RIGHT); allocate_text_bgcolor('#FFFFFF'); draw_formula('y = ax^2', $size = 12, sqrt($ey), $ey, $o_pos = O_POS_UP_CENTER); draw_formula('x = p', $size = 12, $p, $dash_y, $o_pos = O_POS_LOW_CENTER); transparent_text_bgcolor(); draw_formula('p', $size = 12, $p / 2, 0, $o_pos = O_POS_UP_RIGHT); draw_formula('q', $size = 12, $p, $q / 2, $o_pos = O_POS_MIDDLE_LEFT); draw_formula('(p, q)', $size = 12, $p, $q, $o_pos = O_POS_UP_LEFT); //draw_rect($sx, $sy, $ex, $ey); set_scale($scale = 10, $org_x_percent = 75, $org_y_percent = 25); draw_xaxis($x_is_low_pos = true, $sx = -7, $ex = 7); draw_yaxis($y_is_right_pos = false, $sy = -7, $ey = 7); $p = 2; $q = 3.5; draw_dash_line($p, $q, $p, -$q); draw_dash_line(-$p, $q, -$p, -$q); draw_dash_line($p, $q, -$p, $q); draw_dash_line($p, -$q, -$p, -$q); draw_dash_line($p, $q, -$p, -$q); draw_formula('(p,q)', $size = 12, $p, $q, $o_pos = O_POS_LOW_LEFT); draw_formula('(p,-q)', $size = 12, $p, -$q, $o_pos = O_POS_UP_LEFT); draw_formula('(-p,q)', $size = 12, -$p, $q, $o_pos = O_POS_LOW_RIGHT); draw_formula('(-p,-q)', $size = 12, -$p, -$q, $o_pos = O_POS_UP_RIGHT); //draw_rect($sx, $sy, $ex, $ey);
テンプレートを選択するとプログラムに追加されます。
set_scale(...);
allocate_color('black');
allocate_color('gray');
allocate_color('red');
allocate_color('blue');
allocate_color('green');
allocate_color('purple');
allocate_bgcolor('white');
transparent_bgcolor();
set_thick($thick = 1);
set_dashlen($dashlen = 7);
set_arrow_size(...);
draw_line(...);
draw_horizontal($y);
draw_vertical($x);
draw_dash_line(...);
draw_rect(...);
draw_arrow_head(...);
draw_xaxis(...);
draw_yaxis(...);
draw_xyaxis();
draw_circle(...);
draw_arc_deg(...);
draw_arc(...);
draw_dash_arc(...);
M_PI = 3.1415926535898
M_PI_2 = pi/2
M_PI_4 = pi/4
fill_rect(...);
fill_circle(...);
fill_arc_deg(...);
fill_triangle(...);
fill_quadrangle(...);
fill_polygon();
fill_toborder($x, $y, $border_color_x, $border_color_y);
allocate_text_color('black');
allocate_text_color('gray');
allocate_text_color('red');
allocate_text_color('blue');
allocate_text_color('green');
allocate_text_color('purple');
allocate_text_bgcolor('white');
transparent_text_bgcolor();
set_text_size($text_size);
set_text_margin($text_margin);
set_mark_size($mark_size);
draw_text(...);
O_POS_LOW_LEFT
O_POS_LOW_RIGHT
O_POS_UP_RIGHT
O_POS_UP_LEFT
O_POS_LOW_CENTER
O_POS_MIDDLE_RIGHT
O_POS_UP_CENTER
O_POS_MIDDLE_LEFT
O_POS_MIDDLE_CENTER
get_o_pos_by_ang($ang);
draw_formula(...);
ARC_TYPE_NONE
ARC_TYPE_SOLID
ARC_TYPE_DASH
BEG_TYPE_ARROW
END_TYPE_ARROW
draw_arc_mark(...);
draw_corner_mark(...);
draw_marked_triangle(...);
CMARK_NONE 0
CMARK_1_ARC 1
CMARK_2_ARC 2
CMARK_D_ARC 3
CMARK_1_PIE 4
CMARK_2_PIE 5
CMARK_D_PIE 6
CMARK_SQUARE
CMARK_CROSS
CMARK_CIRCLE
CMARK_DOT
draw_mark(...);
draw_mark_on_line(...);
draw_mark_on_circle(...);
MARK_1_LINE
MARK_2_LINE
MARK_3_LINE
MARK_SQUARE
MARK_CROSS
MARK_CIRCLE
MARK_DOT
set_x_def_range(...);
df1_ax_b($a, $b);
df1_x_y($x, $y);
df1_2p($x1, $y1, $x2, $y2);
df2_ax2_bx_c(...);
df2_ax_p2_q(...);
df2_a_x_al_x_be(...);
df_y_fx($y_fx);
df_xt_yt(...);
unit_vector(...);
calc_angle(...);
normalize_ang($ang);
calc_da(...);
calc_intersec_pt_of_lines(...);
calc_intersec_pt_of_lns(...);
rot90_vec(...);
rot_vec(...);
calc_perpendicular_bisector(...);
calc_distance(...);
calc_circumscribed_circle(...);
calc_didtance_to_line(...);
calc_foot_of_perpendicular_line(...);
calc_parallel_line(...);
calc_foot_of_perpendicular_circle(...);
calc_intersec_pts_of_line_circle(...);
calc_intersec_pts_of_circles(...);
calc_inscribed_circle(...);
calc_2p_arc(...);
calc_3dview(...);
clear_canvas();
set_alphablending($alpha = 50);
set_antialias($antialias = true);
transparent_gif_bgcolor();
xf($x)
x_rev($x)
yf($y)
y_rev($y)
作図プログラムをコンパイルして図形を仮表示する
仮表示
作図プログラムをサーバに保存するには、やる勉にログインしてください。
日付順
名前順
図形の新規作成
ログイン
図形の新規作成
ログイン
このページの先頭へ