Similar documents
r3.dvi

Microsoft PowerPoint prog1_doc2x.pptx

Java演習(6) -- 条件分岐 --

入門Java解答.doc

r4.dvi

< F2D89BA8EE882C E6A7464>

tn_soturon_sjis.dvi

アプレットの作成

橡告改.PDF

Microsoft PowerPoint prog1_doc2.pptx

< F2D B825082CC96E291E82E6A7464>

< F2D834F838C A815B A CC>

< F2D E E6A7464>

< F2D A839382CC906A2E6A7464>

< F2D82518E9F8AD CC834F CC8CFC82AB82C68D4C>

< F2D B838A835882CC8CF68EAE2E6A7464>

< F2D F B834E2E6A7464>

< F2D A838B838D96402E6A7464>

Java言語 第1回

< F2D82518E9F8AD CC95BD8D7388DA93AE2E6A7464>

KeyListener init addkeylistener addactionlistener addkeylistener addkeylistener( this ); this.addkeylistener( this ); KeyListener public void keytyped

Local variable x y i paint public class Sample extends Applet { public void paint( Graphics gc ) { int x, y;... int i=10 ; while ( i < 100 ) {... i +=

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A

< F2D82518CC282CC D2E6A7464>

PowerPoint Presentation

Object MenuComponent MenuBar MenuItem Menu CheckboxMenuItem

PowerPoint プレゼンテーション

r2.dvi

Java演習(9) -- クラスとメソッド --

O x y z O ( O ) O (O ) 3 x y z O O x v t = t = 0 ( 1 ) O t = 0 c t r = ct P (x, y, z) r 2 = x 2 + y 2 + z 2 (t, x, y, z) (ct) 2 x 2 y 2 z 2 = 0

Java言語 第1回

Safari AppletViewer Web HTML Netscape Web Web 15-1 Applet Web Applet init Web paint Web start Web HTML stop destroy update init Web paint start Web up

( ) p.1 x y y = ( x ) 1 γ γ = filtergamma.java import java.applet.*; public class filtergamma extends Applet{ Image img; Image new_img; publi

IE6 2 BMI chapter1 Java 6 chapter2 Java 7 chapter3 for if 8 chapter4 : BMI 9 chapter5 Java GUI 10 chapter6 11 chapter7 BMI 12 chap

< F2D8EA CE909482CC92EA82852E6A7464>

AWT setcolor, drawstring Java AWT Abstract Window Toolkit Graphics AWT import import java.awt.* ; // AWT Graphics import java.awt.graphics; // AWT Gra

r14.dvi

2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q B

問1

< F2D82B682E182F182AF82F12E6A7464>

r2.dvi

Java 2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q 2.

19 3!! (+) (>) (++) (+=) for while 3.1!! (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics;

上達Java解答.doc

I. (i) Java? (A). 2Apples (B). Vitamin-C (C). Peach21 (D). Pine_Apple (ii) Java? (A). Java (B). Java (C). Java (D). JavaScript Java JavaScript Java (i

5 p Point int Java p Point Point p; p = new Point(); Point instance, p Point int 2 Point Point p = new Point(); p.x = 1; p.y = 2;

Thread

r6.dvi

任意の加算プログラム

Microsoft PowerPoint - prog11.ppt

r8.dvi

< F2D825282CC947B909482CC A815B83682E6A>

Microsoft PowerPoint - prog11.ppt

2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q B

< F2D92DE82E8914B82CC977088D32E6A7464>

Java演習(2) -- 簡単なプログラム --

PowerPoint プレゼンテーション

Java演習(4) -- 変数と型 --

Applet java.lang.object java.awt.component java.awt.container java.awt.panel java.applet.applet

6 p.1 6 Java GUI GUI paintcomponent GUI mouseclicked, keypressed, actionperformed mouseclicked paintcomponent thread, 1 GUI 6.0.2, mutlithread C

r3.dvi

I 4 p.2 4 GUI java.awt.event.* import /* 1 */ import mouseclicked MouseListener implement /* 2 */ init addmouselistener(this) this /* 3 */ this mousec

I HTML HashMap (i) (ii) :.java import java.net.*; import java.io.*; import java.util.hashmap; public class SimpleStopWatch { public static voi

2

I. (i) Foo public (A). javac Foo.java java Foo.class (C). javac Foo java Foo (ii)? (B). javac Foo.java java Foo (D). javac Foo java Foo.class (A). Jav

2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q B

GUIプログラムⅣ

Microsoft PowerPoint - OOP.pptx

抄録/抄録1    (1)V

GUIプログラムⅤ

Chapter 20. [ ] ; [ ] = new [ ] ; Color colors [ ] = new Color[ 20 ]; // 20 Button operations [ ] = new Button[ 10 ]; // 10 colors[ 3 ] = new Color( 1

II Java :30 12:00 I. I IV II. III. IV. ( a d) V. : this==null, T == N A ActionListener C class D actionperformed G getsource I implements K

AWT setcolor, drawstring Java AWT Abstract Window Toolkit Graphics AWT import import java.awt.* ; // AWT Graphics import java.awt.graphics; // AWT Gra

2008 e-learning T050050

2 p.2 2 Java > javac Hello0.java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.j


vol.30.}...`.X...b.h


I. java.awt.rectangle java.lang.math random Java TM API java.awt Rectangle Rectangle (x,y)... public int x Rectangle X public int y Rectangle Y public

< F2D BCA82CC978E89BA82CC8EC08CB12E6A7464>


次の演習課題(1),(2)のプログラムを完成させよ

: : : TSTank 2

3 p.1 3 Java Java Java try catch C Java if for while C 3.1 boolean Java if C if ( ) 1 if ( ) 1 else , 2 { } boolean true false 2 boolean Gr

Java言語 第1回

text_13.dvi

:30 12:00 I. I VII II. III. IV. ( a d) V. VI : this==null, T == N A ActionListener A addactionlistener C class D actionperforme

2

untitled

r5.dvi

日本内科学会雑誌第102巻第4号

10K pdf

Assignment_.java /////////////////////////////////////////////////////////////////////// // 課題 星の画像がマウスカーソルを追従するコードを作成しなさい 次 ///////////////////

D = [a, b] [c, d] D ij P ij (ξ ij, η ij ) f S(f,, {P ij }) S(f,, {P ij }) = = k m i=1 j=1 m n f(ξ ij, η ij )(x i x i 1 )(y j y j 1 ) = i=1 j


K227 Java 2

JAVA入門


all.dvi

8 if switch for while do while 2

Transcription:

B02-095 2007 2 15

1 3 2 4 2.1............................. 4 2.2........................................ 5 2.3........................................ 6 3 7 3.1................................. 7 3.2.............................. 8 4 10 5 12 5.1................................... 12 5.2.................................. 15 6 17 A 18 2

1 S.I.Newton A.Einstein A.Einstein J.C.Maxwell 1905 1915 3

2 1905 1916 2.1 1687 f = m d2 x dt 2 (1) x m x t f x f = m d2 x dt 2 (2) x x v x t = t x = x vt y = y z = z (3) 4

1: 2.2 1861 rot E = B t rot H = D t + j (5) div D = ρ (6) div B = 0 (7) (4) D = ε 0 E (8) B = µ 0 H (9) E H D B j ρ ε 0,µ 0 (4) rot (9),(5),(8) = 2 + 2 ( 1 2 ) c 2 t 2 E = 0 (10) x 2 y 2 c 2 = 1 µ 0 ε 0 (11) + 2 z 2 c (11) 5

(4) (9) c ether 1887 2.3 v 1. 2. c 3. v 1 1. ct x y z = a 00 a 01 a 02 a 03 a 10 a 11 a 12 a 13 a 20 a 21 a 22 a 23 a 30 a 31 a 32 a 33 t x,y,z 2 3 x x x (12) x t x t 1 3 (12) ct 2 x x x v t = t = 0 y y z z y = y, z = z ct x y z (12) 6

3 3.1 S R x u v f 0 τ λ λ = aτ = a/f 0 a τ 2: t = τ t = τ S x = uτ x = aτ λ λ = (a u) τ = a u f 0 (13) a v τ τ = λ a v = a u f 0 (a v) (14) τ f N a v f N = f 0 a u = f 1 v/a 0 1 u/a (15) (u = 0) f N = f 0 (1 v/a) (16) 7

(v = 0) f N = f 0 1 u/a 16 17 (17) 3.2 3: t = 0 t = τ (x 1,t 1 ) (x 2,t 2 ) 3 x 1 = ct 1 = x 0 + vt 1 x 2 = c (t 2 τ) = x 0 + vt 2 t 2 t 1 = vcτ c v, x 2 x 1 = vcr c v S t 2 t 1 = γ[(t 2 t 1 ) v(x 2 x 1 )/c 2] ( cτ = γ c v v ) vcτ c 2 c v ( ) γc = 1 v2 c v c 2 τ = 1 β γ(1 β 2)τ 8 = γ(1 + β)τ

β = v c γ = (1 β2 ) 1/2 t 2 t 1 τ τ = ( ) 1 + β 1/2 τ (18) 1 β f SR = ( ) 1 β 1/2 f 0 (19) 1 + β (19) (19) β 9

4 4: 4 O t = t 1,x = x 1 t = t 2,x = x 2 O r 1,r 2 τ τ t 2 t 1 = γτ = γ ν (20) r 1c, r 2 c τ τ = t 2 + r 2 c (t 1 + r 1 c ) = γτ (r 1 r 2 ) c (21) r 1,r 2, r 1 r 2 = (x 2 x 1 )cosθ = vγτcosθ (22) v 22 21 ν 10

ν ν = γ(1 βcosθ) = ν (1 β2 ) 1 βcosθ 1 2 (23) θ = π cosπ = 1 23 19 11

5 5.1 5: 5 6: 10 6 7 8 9 12

7: 30 8: 50 15 13

9: 90 10: 14

5.2 11: 12: 30 15

13: 50 14: 90 16

6 15 15: 40 50 50 50 θ = 90 60 14 StarBow 17

A import java.awt.*; import java.applet.*; import java.awt.event.*; import java.util.*; import java.applet.applet; public class subyukimi extends Applet implements ActionListener { TextField sf,ss,os,tnm,tnn; Button b1 = new Button("ttt"); Color test1,test2,test3; double idou,idoun; public void init() { add( new Label("SourceFrequency", Label.RIGHT) ); sf = new TextField( "", 10); add( sf ); add( new Label("Sourcespd", Label.CENTER) ) ; ss = new TextField( "", 10); add( ss ); add( new Label("Originspd", Label.CENTER) ) ; os = new TextField( "", 10); add( os ); add( new Label("kekka", Label.CENTER) ) ; tnm = new TextField( "", 10); add( tnm ); os.addactionlistener(this); add( new Label("kekka", Label.CENTER) ) ; tnn = new TextField( "", 10); add( tnn ); os.addactionlistener(this); setbackground(color.white); b1.setbackground(color.white); b1.setforeground(color.black); b1.addactionlistener(this); add(b1); 18

public void paint(graphics g) { g.drawrect(75,75,125,100); if (test1!=null){ g.setcolor(test1); g.fillrect(75,75,125,100); else{ g.setcolor(color.black); g.drawrect(75,75,125,100); g.drawrect(210,75,125,100); if (test2!=null){ g.setcolor(test2); g.fillrect(210,75,125,100); else{ g.setcolor(color.black); g.drawrect(210,75,125,100); g.drawrect(345,75,125,100); if (test3!=null){ g.setcolor(test3); g.fillrect(345,75,125,100); else{ g.setcolor(color.black); g.drawrect(345,75,125,100); //from coco Color col[] = new Color [312]; int c = 0; for(int i=0;i < 52;i++){ col[i] = new Color(255-i*5,0,255); col[i+52] = new Color(i*2,i*2,255); col[i+104] = new Color(102-i*2,100+i*3,255-i*5); col[i+156] = new Color(i*5,255,0); col[i+208] = new Color(255,255-i,0); col[i+260] = new Color(255,204-i*4,0); int cl; 19

for(c=0;c<312;c++){ cl=c+15; if(cl>=312){ cl-=312; int i; for(i=0;i<312;i++){ cl = c + i; if(cl >= 312){ cl -= 312; g.setcolor(col[cl]); g.drawline(350+i+(int)idou,200,350+i+(int)idou,250); g.setcolor(color.red); g.fillrect(350+i+(int)idou,200,50,51); g.setcolor(color.black); g.drawline(350,180,350,270); g.drawline(712,180,712,270); //nuton Color coln[] = new Color [312]; int d = 0; for( int j=0;j < 52;j++){ coln[j] = new Color(255-j*5,0,255); coln[j+52] = new Color(j*2,j*2,255); coln[j+104] = new Color(102-j*2,100+j*3,255-j*5); coln[j+156] = new Color(j*5,255,0); coln[j+208] = new Color(255,255-j,0); coln[j+260] = new Color(255,204-j*4,0); cl=0; for(d=0;d<312;d++){ cl=d+15; if(cl>=312){ cl-=312; 20

int j; for(j=0;j<312;j++){ cl = d + j; if(cl >= 312){ cl -= 312; g.setcolor(coln[cl]); g.drawline(350+j+(int)idoun,300,350+j+(int)idoun,350); g.setcolor(color.red); g.fillrect(350+j+(int)idoun,300,50,51); g.setcolor(color.black); g.drawline(350,280,350,370); g.drawline(712,280,712,370); public void actionperformed(actionevent e) { double sf1=double.parsedouble(sf.gettext()); double ss1=double.parsedouble(ss.gettext()); double os1=double.parsedouble(os.gettext()); double v=ss1+os1; double he=(1.0-v)/(1.0+v); double fn=sf1*((1.0-os1)/(1.0-ss1)); double ff=sf1*math.sqrt((1.0-v)/(1.0+v)); 21

idou=ff-sf1; idoun=fn-sf1; tnm.settext("sr"+ff); tnn.settext("n"+fn); if(430.0<=sf1 && sf1<490.0){ test1=new Color(255,0,0); else if(490.0<=sf1 && sf1<510.0){ test1=new Color(255,200,0); else if(510.0<=sf1 && sf1<530.0){ test1=new Color(255,255,0); else if(530.0<=sf1 && sf1<600.0){ test1=new Color(0,255,0); else if(600.0<=sf1 && sf1<670.0){ test1=new Color(100,100,255); else if(670.0<=sf1 && sf1<700.0){ test1=new Color(0,0,255); else if(700.0<=sf1 && sf1<750.0){ test1=new Color(255,0,255); else{ test1 = null; if( 430.0<=ff && ff<490.0){ test2=new Color(255,0,0); else if(490.0<=ff && ff<510.0){ test2=new Color(255,200,0); else if(510.0<=ff && ff<530.0){ test2=new Color(255,255,0); else if(530.0<=ff && ff<600.0){ test2=new Color(0,255,0); else if(600.0<=ff && ff<670.0){ test2=new Color(100,100,255); else if(670.0<=ff && ff<700.0){ test2=new Color(0,0,255); else if(700.0<=ff && ff<750.0 ){ test2=new Color(255,0,255); else{ test2 = null; if( 430.0<=fn && fn<490.0){ 22

test3=new Color(255,0,0); else if(490.0<=fn && fn<510.0){ test3=new Color(255,200,0); else if(510.0<=fn && fn<530.0){ test3=new Color(255,255,0); else if(530.0<=fn && fn<600.0){ test3=new Color(0,255,0); else if(600.0<=fn && fn<670.0){ test3=new Color(100,100,255); else if(670.0<=fn && fn<700.0){ test3=new Color(0,0,255); else if(700.0<=fn && fn<750.0 ){ test3=new Color(255,0,255); else{ test3 = null; repaint(); \\ import java.awt.*; import java.applet.*; import java.awt.event.*; import java.util.*; public class side7kai extends Applet implements ActionListener { TextField sf,ss,os,ka,tnm; Button b1 = new Button("ttt"); Color test1,test2,test3,test4; double ff,f1,f2,f3,f4,sf1,ss1,os1,v; 23

public void init() { add( new Label("SourceFrequency", Label.RIGHT) ); sf = new TextField( "", 10); add( sf ); sf.addactionlistener(this); add( new Label("Sourcespd", Label.CENTER) ) ; ss = new TextField( "", 10); add( ss ); ss.addactionlistener(this); add( new Label("Originspd", Label.CENTER) ) ; os = new TextField( "", 10); add( os ); os.addactionlistener(this); setbackground(color.white); b1.setbackground(color.white); b1.setforeground(color.black); b1.addactionlistener(this); add(b1); public void paint(graphics g){ Color col[] = new Color [312]; int c = 0; for(int i=0;i < 52;i++){ col[i] = new Color(255-i*5,0,255); col[i+52] = new Color(i*2,i*2,255); col[i+104] = new Color(102-i*2,100+i*3,255-i*5); col[i+156] = new Color(i*5,255,0); col[i+208] = new Color(255,255-i,0); col[i+260] = new Color(255,204-i*4,0); 24

int cl; for(c=0;c<312;c++){ cl=c+15; if(cl>=312){ cl-=312; for(int q=90;q>0;q--){ double ff=sf1*( Math.sqrt(1.0-(v*v)) /(1.0-(v*(Math.cos((Math.PI/180)*q))) )); cl=742-(int)ff; if (0<=cl && cl<311){ g.setcolor(col[cl]); g.filloval(200-(q*2),200-(q*2),(q*2)*2,(q*2)*2); else{ g.setcolor(color.white); g.filloval(200-(q*2),200-(q*2),(q*2)*2,(q*2)*2); g.setcolor(color.black); g.drawline(200,0,200,400); g.drawline(0,200,400,200); g.drawoval(20,20,360,360); g.drawoval(80,80,240,240); g.drawoval(140,140,120,120); g.drawoval(185,185,30,30); g.drawstring("30",250,220); g.drawstring("60",310,230); g.drawstring("90",370,240); 25

public void actionperformed(actionevent e) { sf1=double.parsedouble(sf.gettext()); ss1=double.parsedouble(ss.gettext()); os1=double.parsedouble(os.gettext()); v=ss1-os1; double f1=sf1*( Math.sqrt(1.0-(v*v)) /(1.0-(v*(Math.cos((Math.PI/180)*30))) )); if(430.0<=f1 && f1<490.0){ test1=new Color(255,0,0); else if(490.0<=f1 && f1<510.0){ test1=new Color(255,200,0); else if(510.0<=f1 && f1<530.0){ test1=new Color(255,255,0); else if(530.0<=f1 && f1<600.0){ test1=new Color(0,255,0); else if(600.0<=f1 && f1<670.0){ test1=new Color(100,100,255); else if(670.0<=f1 && f1<700.0){ test1=new Color(0,0,255); else if(700.0<=f1 && f1<750.0){ test1=new Color(255,0,255); else{ test1 = null; repaint(); class zeek{ public static void main(string[] args){ 26

double sf1=520,v=0.5; for(int q = 1; q < 90;q++){ double ff=sf1*( Math.sqrt(1.0-(v*v)) /(1.0-(v*(Math.cos((Math.PI/180)*q))) )); int cl=742-(int)ff; //double ff=sf1*( Math.sqrt(1.0-(v*v)) /(1.0-(v*(Math.cos(i))) )); //System.out.println(i+ " : "+ff); System.out.println(q+":"+cl+"--ff;"+ff+"---cos;"+Math.cos((Math.PI/180)*q)); [1] (1996) [2] (1996) 27