PHPで作図
このページの末尾へ
図形のコピー
: 集合
ヘルプ
ドット数(幅
高
)形式(
gif
jpg
)
set_scale($scale = 10, $org_x_percent = 0, $org_y_percent = 50); $cx = 5; $cy = 5; $r = 4; allocate_color('#33CCCC'); fill_circle($cx, $cy, $r); allocate_color('black'); draw_circle($cx, $cy, $r); $tx = $cx + $r * cos(deg2rad(135)); $ty = $cy + $r * sin(deg2rad(135)); allocate_text_bgcolor('white'); draw_text('B', $tx, $ty, O_POS_MIDDLE_CENTER, false); $tx = $cx + 0.8 * $r * cos(deg2rad(90)); $ty = $cy + 0.8 * $r * sin(deg2rad(90)); transparent_text_bgcolor(); draw_text('・ y', $tx, $ty, O_POS_MIDDLE_CENTER, false); $cx = 6; $cy = 4; $r = 2; allocate_color('#FFCC00'); fill_circle($cx, $cy, $r); allocate_color('black'); draw_circle($cx, $cy, $r); $tx = $cx + $r * cos(deg2rad(135)); $ty = $cy + $r * sin(deg2rad(135)); allocate_text_bgcolor('white'); draw_text('A', $tx, $ty, O_POS_MIDDLE_CENTER, false); $tx = $cx; $ty = $cy; transparent_text_bgcolor(); draw_text('・ x', $tx, $ty, O_POS_MIDDLE_CENTER, false); set_scale($scale = 10, $org_x_percent = 33, $org_y_percent = 50); $cax = 3; $cay = 5; $ra = 2; $tax = $cax + $ra * cos(deg2rad(135)); $tay = $cay + $ra * sin(deg2rad(135)); $cbx = 6; $cby = 5; $rb = 3; $tbx = $cbx + $rb * cos(deg2rad(45)); $tby = $cby + $rb * sin(deg2rad(45)); allocate_color('#FFCC00'); fill_circle($cax, $cay, $ra); allocate_color('#33CCCC'); fill_circle($cbx, $cby, $rb); allocate_color('black'); draw_circle($cax, $cay, $ra); draw_circle($cbx, $cby, $rb); $border_color_x = $cbx + $rb * cos(deg2rad(180)); $border_color_y = $cby + $rb * sin(deg2rad(180)); allocate_color('#FF6600'); fill_toborder($border_color_x + 0.1, $border_color_y, $border_color_x, $border_color_y); allocate_text_bgcolor('white'); draw_text('A', $tax, $tay, O_POS_MIDDLE_CENTER, false); draw_text('B', $tbx, $tby, O_POS_MIDDLE_CENTER, false); set_scale($scale = 10, $org_x_percent = 66, $org_y_percent = 50); $cx = 5; $cy = 5; $r = 1.8; $rs = 2.5; $anga = deg2rad(90); $angb = deg2rad(90+120); $angc = deg2rad(90+120+120); $cax = $cx + $r * cos($anga); $cay = $cy + $r * sin($anga); $ra = $rs; $tax = $cax + $ra * cos($anga); $tay = $cay + $ra * sin($anga); $cbx = $cx + $r * cos($angb); $cby = $cy + $r * sin($angb); $rb = $rs; $tbx = $cbx + $ra * cos($angb); $tby = $cby + $ra * sin($angb); $ccx = $cx + $r * cos($angc); $ccy = $cy + $r * sin($angc); $rc = $rs; $tcx = $ccx + $ra * cos($angc); $tcy = $ccy + $ra * sin($angc); allocate_color('#FFCC00'); fill_circle($cax, $cay, $ra); allocate_color('#33CCCC'); fill_circle($cbx, $cby, $rb); allocate_color('#66FF00'); fill_circle($ccx, $ccy, $rc); allocate_color('black'); draw_circle($cax, $cay, $ra); draw_circle($cbx, $cby, $rb); draw_circle($ccx, $ccy, $rc); $border_color_x = $ccx + $rc; $border_color_y = $ccy; allocate_color('#FF6600'); $fx = $cx + $r * cos(($anga + $angb)/2); $fy = $cy + $r * sin(($anga + $angb)/2); fill_toborder($fx, $fy, $border_color_x, $border_color_y); allocate_color('#0000FF'); $fx = $cx + $r * cos(($angb + $angc)/2); $fy = $cy + $r * sin(($angb + $angc)/2); fill_toborder($fx, $fy, $border_color_x, $border_color_y); allocate_color('#9900FF'); $fx = $cx + $r * cos(($angc + $anga + M_PI * 2)/2); $fy = $cy + $r * sin(($angc + $anga + M_PI * 2)/2); fill_toborder($fx, $fy, $border_color_x, $border_color_y); allocate_color('#FF0000'); $fx = $cx; $fy = $cy; fill_toborder($fx, $fy, $border_color_x, $border_color_y); allocate_text_bgcolor('white'); draw_text('A', $tax, $tay, O_POS_MIDDLE_CENTER, false); draw_text('B', $tbx, $tby, O_POS_MIDDLE_CENTER, false); draw_text('C', $tcx, $tcy, O_POS_MIDDLE_CENTER, false); set_scale($scale = 10, $org_x_percent = 0, $org_y_percent = 0); $ax = 0.5; $ay = 1.5; $bx = 9.5; $by = 8.5; $tux = $ax + 2; $tuy = $by; $cax = 3.3; $cay = 5; $ra = 2; $tax = $cax + $ra * cos(deg2rad(135)); $tay = $cay + $ra * sin(deg2rad(135)); $taZx = 7.5; $taZy = 5; allocate_color('#CCFF66'); fill_rect($ax, $ay, $bx, $by); allocate_color('#FFCC00'); fill_circle($cax, $cay, $ra); allocate_color('black'); draw_rect($ax, $ay, $bx, $by); draw_circle($cax, $cay, $ra); allocate_text_bgcolor('white'); draw_text('U', $tux, $tuy, O_POS_MIDDLE_CENTER, false); draw_text('A', $tax, $tay, O_POS_MIDDLE_CENTER, false); draw_formula('overline{$A}', $size=12, $taZx, $taZy, O_POS_MIDDLE_CENTER); set_scale($scale = 10, $org_x_percent = 33, $org_y_percent = 0); $ax = 0.5; $ay = 1.5; $bx = 9.5; $by = 8.5; $tux = $ax + 2; $tuy = $by; $cax = 3.3; $cay = 5; $ra = 2; $tax = $cax + $ra * cos(deg2rad(135)); $tay = $cay + $ra * sin(deg2rad(135)); $cbx = 6; $cby = 5; $rb = 2.5; $tbx = $cbx + $rb * cos(deg2rad(45)); $tby = $cby + $rb * sin(deg2rad(45)); allocate_color('#CCFF66'); fill_rect($ax, $ay, $bx, $by); allocate_color('black'); draw_rect($ax, $ay, $bx, $by); draw_circle($cax, $cay, $ra); draw_circle($cbx, $cby, $rb); allocate_color('#FF6600'); $border_color_x = $cbx - $rb; $border_color_y = $cby; fill_toborder($border_color_x + 0.1, $border_color_y, $border_color_x, $border_color_y); allocate_text_bgcolor('white'); draw_text('U', $tux, $tuy, O_POS_MIDDLE_CENTER, false); draw_text('A', $tax, $tay, O_POS_MIDDLE_CENTER, false); draw_text('B', $tbx, $tby, O_POS_MIDDLE_CENTER, false); set_scale($scale = 10, $org_x_percent = 66, $org_y_percent = 0); $ax = 0.5; $ay = 1.5; $bx = 9.5; $by = 8.5; $tux = $ax + 2; $tuy = $by; $cax = 3.3; $cay = 5; $ra = 2; $tax = $cax + $ra * cos(deg2rad(135)); $tay = $cay + $ra * sin(deg2rad(135)); $cbx = 6; $cby = 5; $rb = 2.5; $tbx = $cbx + $rb * cos(deg2rad(45)); $tby = $cby + $rb * sin(deg2rad(45)); allocate_color('#CCFF66'); fill_rect($ax, $ay, $bx, $by); allocate_color('#00FF33'); fill_circle($cax, $cay, $ra); allocate_color('#00FF33'); fill_circle($cbx, $cby, $rb); allocate_color('black'); draw_rect($ax, $ay, $bx, $by); draw_circle($cax, $cay, $ra); draw_circle($cbx, $cby, $rb); allocate_text_bgcolor('white'); draw_text('U', $tux, $tuy, O_POS_MIDDLE_CENTER, false); draw_text('A', $tax, $tay, O_POS_MIDDLE_CENTER, false); draw_text('B', $tbx, $tby, O_POS_MIDDLE_CENTER, false);
テンプレートを選択するとプログラムに追加されます。
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)
作図プログラムをコンパイルして図形を仮表示する
仮表示
作図プログラムをサーバに保存するには、やる勉にログインしてください。
日付順
名前順
図形の新規作成
ログイン
図形の新規作成
ログイン
このページの先頭へ