トップページ > 病院・医者 > 2020年08月08日 > Fonqs1WQ

書き込み順位&時間帯一覧

5 位/224 ID中時間01234567891011121314151617181920212223Total
書き込み数0000000000000000004030007



使用した名前一覧書き込んだスレッド一覧
卵の名無しさん
底辺私立医大を卒業した医者って頭悪いよね? Part17

書き込みレス一覧

底辺私立医大を卒業した医者って頭悪いよね? Part17
410 :卵の名無しさん[sage]:2020/08/08(土) 18:37:12.07 ID:Fonqs1WQ
rm(list=ls())
source('toolmini.R')
# 円錐角から展開図を表示
opened <- function(α=40*pi/180,R=1){
plot(NULL,type='n',xlim=c(-R,R),ylim=c(-R,R),asp=1,ann=F,axes=T)
abline(h=0,v=0,col=8,lty=3)
β=pi*sin(α)
seg(0,-R*sin(α)+R*1i*cos(α))
seg(0, R*sin(α)+R*1i*cos(α))
# seg(-R*sin(α)+R*1i*cos(α),R*sin(α)+R*1i*cos(α))
seg(0,-R*sin(β)+R*1i*cos(β),lty=2)
seg(0, R*sin(β)+R*1i*cos(β),lty=2)

pt(R*0.2*(-sin(α/2)+1i*cos(α/2)),'α') ; pt(R*0.2*(sin(α/2)+1i*cos(α/2)),'α')
alpha=seq(pi/2-α,pi/2,0.01)
lines(0.18*R*cos(alpha),0.18*R*sin(alpha),col=8)
alpha=seq(pi/2,pi/2+α,0.01)
lines(0.20*R*cos(alpha),0.20*R*sin(alpha),col=8)
pt(R*0.3*(-sin(β/2)+1i*cos(β/2)),'β') ; pt(R*0.3*(sin(β/2)+1i*cos(β/2)),'β')
beta=seq(pi/2,pi/2+β,0.01)
lines(0.3*R*cos(beta),0.3*R*sin(beta),col=8)
beta=seq(pi/2-β,pi/2,0.01)
lines(0.28*R*cos(beta),0.28*R*sin(beta),col=8)
Beta=seq(pi/2-β,pi/2+β,0.01)
lines(R*cos(Beta),R*sin(Beta),lty=2)
pt(-0.025i*R,'O')
底辺私立医大を卒業した医者って頭悪いよね? Part17
411 :卵の名無しさん[sage]:2020/08/08(土) 18:37:25.28 ID:Fonqs1WQ
p=0.7*R;q=0.3*R
A=p+1i*q ; pt(A,'A(p,q)')
seg(A,0,col=8)
OA=abs(A-0)
(θ=atan(q/p)) ; Arg(A)
pt(0.1*OA*cos(θ/2)+1i*0.1*OA*sin(θ/2),'θ')
th=seq(0,θ,0.01)
lines(0.2*OA*cos(th),0.2*OA*sin(th),col=8)
th=seq(pi/2-β,pi/2+β,0.01)
lines(OA*cos(th),OA*sin(th),col=8)
B=OA*1i ; pt(B,'B',cex=1.2)
C=OA*cos(pi/2-β)+1i*OA*sin(pi/2-β) ; pt(C,'C')
(rdash=OA*β/pi) # ⌒BC=πr' where β = pi*sin(α), then rdash=OA*sin(α)
cir(0,OA+rdash,rdash,col=8)
D=1i*(OA+rdash) ; pt(D,'D')
th=seq(θ,pi/2,0.1)
lines(OA*cos(th),OA*sin(th),col=2,lwd=2)
# arc(BA)=arc(BE) OA*(pi/2-θ)=rdash*δ
δ=OA*(pi/2-θ)/rdash # OA*(pi/2-θ)/OA*sin(α) = (pi/2-θ)/sin(α)
th=seq(-pi/2,-pi/2+δ,0.01)
lines(rdash*cos(th),rdash*sin(th)+(OA+rdash),lwd=2,col=4)
lines(0.2*rdash*cos(th),0.2*rdash*sin(th)+(OA+rdash),col=8)
E=rdash*sin(δ)+1i*(rdash*(1-cos(δ))+OA) ; pt(E,'E')
seg(D,E,col=8)
pt((D+E)/2,'r\'')
pt(0.2*rdash*cos(-pi/2+δ/2)+1i*0.2*rdash*sin(-pi/2+δ/2)+D,'δ')
}
opened(40*pi/180)
底辺私立医大を卒業した医者って頭悪いよね? Part17
412 :卵の名無しさん[sage]:2020/08/08(土) 18:37:29.83 ID:Fonqs1WQ
oncone <- function(p,q,α=40*pi/180){ # (p,q) 展開図上の座標、頂点の角度=2α
OA=sqrt(p^2+q^2)
θ=Arg(p+1i*q)
β=pi*sin(α) # π*r=R*β ; r=R*sin(α)
rdash=OA*sin(α) # r'== OA*β/π, r'*π == OA*β : hemi-circle==arc(B-c)
δ=(pi/2-θ)/sin(α) # r'*δ == OA*(π/2-θ) ; δ == OA*(π/2-θ)/r'  
x=rdash*sin(δ) # Re(E)
y=rdash/tan(α) # tan(α)=r'/y
z=rdash-rdash*cos(δ) # IM(E-B) ; rdash+rdash(cos(π-δ))
c(x=x,y=y,z=z)
}

onCone=Vectorize(oncone)
底辺私立医大を卒業した医者って頭悪いよね? Part17
413 :卵の名無しさん[sage]:2020/08/08(土) 18:37:46.52 ID:Fonqs1WQ
oncone <- function(p,q,α=40*pi/180){ # (p,q) 展開図上の座標、頂点の角度=2α
OA=sqrt(p^2+q^2)
θ=Arg(p+1i*q)
β=pi*sin(α) # π*r=R*β ; r=R*sin(α)
rdash=OA*sin(α) # r'== OA*β/π, r'*π == OA*β : hemi-circle==arc(B-c)
δ=(pi/2-θ)/sin(α) # r'*δ == OA*(π/2-θ) ; δ == OA*(π/2-θ)/r'  
x=rdash*sin(δ) # Re(E)
y=rdash/tan(α) # tan(α)=r'/y
z=rdash-rdash*cos(δ) # IM(E-B) ; rdash+rdash(cos(π-δ))
c(x=x,y=y,z=z)
}
底辺私立医大を卒業した医者って頭悪いよね? Part17
414 :卵の名無しさん[sage]:2020/08/08(土) 20:21:06.61 ID:Fonqs1WQ
ド底辺シリツ医には解けないであろう問題。

https://i.imgur.com/iBRWjep.jpg

プログラムして20度以外でも答がでるようにしてみた。

intsect <- function(a,b,c,d){
a1=Re(a) ; a2=Im(a)
b1=Re(b) ; b2=Im(b)
p=(a2-b2)/(a1-b1)
c1=Re(c) ; c2=Im(c)
d1=Re(d) ; d2=Im(d)
q=(c2-d2)/(c1-d1)
if(p==q) return(NA)
else{
x= ((p*a1 - a2) - (q*c1 - c2))/ (p-q)
y= p*x - ( p*a1 - a2)
x + 1i*y
}
}
foo <- function(N20=20){

plot(NULL,type='n',xlim=c(0,2),ylim=c(0,2),asp=1,ann=F)
底辺私立医大を卒業した医者って頭悪いよね? Part17
415 :卵の名無しさん[sage]:2020/08/08(土) 20:21:11.34 ID:Fonqs1WQ
u=pi/180
A=cos(N20*u)+1i*sin(N20*u) ; pt(A,'A')
seg(0,A)
B=cos(2*N20*u)+1i*sin(2*N20*u) ; pt(B,'B')
seg(0,B)
seg(A,B)
abline(h=0,col=8)
a=Arg(A-B)/u+N20
f <- function(x) tan(a*u)*(x-Re(B))+Im(B)
curve(f(x),add=T,col=8)
C=intsect(0i,1+0i,B,1i*f(0)) ; pt(C,'C')
seg(C,A)
(Arg(A-C)-Arg(B-C))/u
}
foo=Vectorize(foo)
x=foo(1:35)
data.frame(angle=1:35,x=x)
底辺私立医大を卒業した医者って頭悪いよね? Part17
416 :卵の名無しさん[sage]:2020/08/08(土) 20:40:27.27 ID:Fonqs1WQ
>>413
https://i.imgur.com/Nq1xRAc.png

atanだと返り値が-pi/2,pi/2なのでうまくいかなかった。
偏角を返すArgにしてようやくデバッグできた。


※このページは、『2ちゃんねる』の書き込みを基に自動生成したものです。オリジナルはリンク先の2ちゃんねるの書き込みです。
※このサイトでオリジナルの書き込みについては対応できません。
※何か問題のある場合はメールをしてください。対応します。