SlideShare a Scribd company logo
1 of 14
게임 프로그래
머를 위한 기초
수학 및 물리
제 8 장 일차원 운동
               발표자 : 유유
속력과 속도
속력 : 물체가 얼마나 빨리 움직이는지를 측정하는 양
속도 : 속력을 벡터로 취급하는 양 , 방향을 가진 속력
등속도 운동의 이동 거리
속도 V 가 이정할 때
변위 ( 거리 ) = 속도 * 시간 ( D = v * t )
프레임 사이의 변위
시간이 1 프레임 일때 ( 통상 1/30 초 = 30F ra me )
새위치 = 이전위치 + 속도 * 시간 ( 프레임타임 )
평균속도
임이의 변위와 시간 간격 t 가 주어질 때 ,




순간속도


만약 등속도 운동을 하고 있다면 평균속도와 순간속도는 어
느 지점에서나 일치합니다 .
가속도
가속도는 속력을 올리거나 내리는 정도
속도가 변하지 않아 전혀 바뀌지 않는다면 , 가속도는 0 이
됩니다




가속도의 단위는 길이의 단위를 시간 단위의 제곱으로 나눈
것입니다 .
운동방정식
방정식을 더 간단히 하기 위해 , 시간 간격을   대신 t
로 표현하겠습니다


가속도의 정의로 부터




운동방정식 1


최종속도 = 초기속도   + 가속도 * 시간
운동방정식 2
등가속도 운동일 때




평균속도 = ( 초기속도 + 최종속도 ) /2
운동방정식 3


변위 = ½ ( 초기속도 + 최종속도 ) * 시간
운동방정식 4


변위 = 초기속도 * 시간 + ½ 가속도 * 시간 2
운동방정식 5


초기속도 2 = 초기속도 2 + 2 * 가속도 * 변위
ANIMATION
F ra me A nima tio n
: F ra me 기준 , 모든 F ra me 이 있어야 합니다 .
Ke yfra me A nima tio n
: Ke y 기준 , Ke y 와 시간으로 F ra me   을 계산합니다 .
Ke yfra me 은 시간을 기준으로 계산됩니다 .
프레임 시간이란 한 프레임을 만들어 내는데 걸리는 시간입니다 .
프레임 시간은 = 1/F P S ( F ra me 률 /F ra me Pe r S e c ) , 30F ra me 인
경우 1/30 즉 , 30 F ra me 의 A nima tio n 을 전체 시간을 1 로 봤
을 때 값입니다 .


새 시간 = 이전 시간 + ( Tic k 당 시간 / 프레임시간 ) * A nima tio n
속도
왜냐하면 게임 F ra me 과 A nima tio n 의 F ra me 은 동일하지 않기
때문입니다 .
프레임시간을 통해서 A nima tio n 의 시간으로 동기화 시켜줍니다 .
즉 , Tic k 당 시간을 F ra me 으로 나눠서 프레임시간을 다시 계산해
줍니다 .
A nima tio n Re s o urc e 작업시 30 F ra me 으로 맞춰서 변경해주지만
이에 속도값으로 제어합니다 .
프레임시간으로도 A nima tio n 속도를 제어할 수 있을 수 있기 때문에
고정된 값이 아닌 이상 위와 같이 계산을 해주지 않으면 그래픽에서
작업해준 정보와 다르게 더 느리거나 빠른 A nima tio n 을 볼 수 있을
INTERPOLATION
D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp
  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, FLOAT s )
{
  pOut->x = pV1->x + s * (pV2->x - pV1->x);
  pOut->y = pV1->y + s * (pV2->y - pV1->y);
  pOut->z = pV1->z + s * (pV2->z - pV1->z);
  return pOut;
}


중간위치 = 처음위치 * ( 1 – s ) + 최종위치 * s
s = 보간 값 = ( 현재 시간 – 처음 시간 ) / ( 최종 시간 –처
음 시간 )
현재 시간 ( Tic k 당 갱신 시간 )
처음 시간 ( 이전 F ra me 시간 ) / 최종 시간 ( 다음
F ra me 시간 )

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

게임 프로그래머를 위한 기초 수학 및 물리 - 8장

  • 1. 게임 프로그래 머를 위한 기초 수학 및 물리 제 8 장 일차원 운동 발표자 : 유유
  • 2. 속력과 속도 속력 : 물체가 얼마나 빨리 움직이는지를 측정하는 양 속도 : 속력을 벡터로 취급하는 양 , 방향을 가진 속력
  • 3. 등속도 운동의 이동 거리 속도 V 가 이정할 때 변위 ( 거리 ) = 속도 * 시간 ( D = v * t )
  • 4. 프레임 사이의 변위 시간이 1 프레임 일때 ( 통상 1/30 초 = 30F ra me ) 새위치 = 이전위치 + 속도 * 시간 ( 프레임타임 )
  • 5. 평균속도 임이의 변위와 시간 간격 t 가 주어질 때 , 순간속도 만약 등속도 운동을 하고 있다면 평균속도와 순간속도는 어 느 지점에서나 일치합니다 .
  • 6. 가속도 가속도는 속력을 올리거나 내리는 정도 속도가 변하지 않아 전혀 바뀌지 않는다면 , 가속도는 0 이 됩니다 가속도의 단위는 길이의 단위를 시간 단위의 제곱으로 나눈 것입니다 .
  • 7. 운동방정식 방정식을 더 간단히 하기 위해 , 시간 간격을 대신 t 로 표현하겠습니다 가속도의 정의로 부터 운동방정식 1 최종속도 = 초기속도 + 가속도 * 시간
  • 8. 운동방정식 2 등가속도 운동일 때 평균속도 = ( 초기속도 + 최종속도 ) /2
  • 9. 운동방정식 3 변위 = ½ ( 초기속도 + 최종속도 ) * 시간
  • 10. 운동방정식 4 변위 = 초기속도 * 시간 + ½ 가속도 * 시간 2
  • 11. 운동방정식 5 초기속도 2 = 초기속도 2 + 2 * 가속도 * 변위
  • 12. ANIMATION F ra me A nima tio n : F ra me 기준 , 모든 F ra me 이 있어야 합니다 . Ke yfra me A nima tio n : Ke y 기준 , Ke y 와 시간으로 F ra me 을 계산합니다 .
  • 13. Ke yfra me 은 시간을 기준으로 계산됩니다 . 프레임 시간이란 한 프레임을 만들어 내는데 걸리는 시간입니다 . 프레임 시간은 = 1/F P S ( F ra me 률 /F ra me Pe r S e c ) , 30F ra me 인 경우 1/30 즉 , 30 F ra me 의 A nima tio n 을 전체 시간을 1 로 봤 을 때 값입니다 . 새 시간 = 이전 시간 + ( Tic k 당 시간 / 프레임시간 ) * A nima tio n 속도 왜냐하면 게임 F ra me 과 A nima tio n 의 F ra me 은 동일하지 않기 때문입니다 . 프레임시간을 통해서 A nima tio n 의 시간으로 동기화 시켜줍니다 . 즉 , Tic k 당 시간을 F ra me 으로 나눠서 프레임시간을 다시 계산해 줍니다 . A nima tio n Re s o urc e 작업시 30 F ra me 으로 맞춰서 변경해주지만 이에 속도값으로 제어합니다 . 프레임시간으로도 A nima tio n 속도를 제어할 수 있을 수 있기 때문에 고정된 값이 아닌 이상 위와 같이 계산을 해주지 않으면 그래픽에서 작업해준 정보와 다르게 더 느리거나 빠른 A nima tio n 을 볼 수 있을
  • 14. INTERPOLATION D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, FLOAT s ) { pOut->x = pV1->x + s * (pV2->x - pV1->x); pOut->y = pV1->y + s * (pV2->y - pV1->y); pOut->z = pV1->z + s * (pV2->z - pV1->z); return pOut; } 중간위치 = 처음위치 * ( 1 – s ) + 최종위치 * s s = 보간 값 = ( 현재 시간 – 처음 시간 ) / ( 최종 시간 –처 음 시간 ) 현재 시간 ( Tic k 당 갱신 시간 ) 처음 시간 ( 이전 F ra me 시간 ) / 최종 시간 ( 다음 F ra me 시간 )