Worthless... stored for future


Voluntary and involuntary eye movements 


  In order to acquire, fixate, and track the visual stimuli, human eyes move both voluntarily and involuntarily. Most of the eye movements are involuntary reflexes except for saccades, vergence shifts, and smooth pursuits. 


Voluntary eye movements

- Saccades: Voluntary eye movements occur in small jumps called saccades. Horizontal and vertical saccades use different neuronal circuitry. Horizontal saccades are initiated by neurons in the frontal eye fields of the cerebral cortex. Activation of the right frontal eye field will cause the eyes to look to the left and activation of the left frontal eye field will cause the eyes to look to the right. Vertical saccades are activated by diffuse areas of the cortex. 

  In terms of eye movement types, we can classify them as follows

- voluntary motion

- tracking (both voluntary and involuntary) 

- convergence.

- pupillary reactions

- control of the lens


They are mostly reflexes rather than voluntary movement.



Voluntary motion


  Voluntary eye movements occur in saccades. Saccade movement indicates very fast jump from one eye position to another whereas smooth pursuit indicates slow and smooth eye movement. Saccades serve as fixation, rapid eye movement, and the fast-phase of optokinetic nystagmus[1]. We call small jumps as microsaccades and they occur even when the eye is still. 

  Voluntary horizontal and vertical gaze conjugate different neuronal circuitry. The voluntary horizontal gaze is initiated by neurons in the frontal eye field of the cerebral cortex. Activation of the right frontal eye field will cause the eyes to look to the left and activation of the left frontal eye field will cause the eye to look to the right. The voluntary vertical gaze follows a different pathway. First of all, there is no single cortical center responsible for the vertical gaze. Instead, diffuse areas of the cortex project to the rostral interstitial nucleus of the Medial Longitudinal Fasciculus (MLF). 



  Most of our normal voluntary eye movements are not smooth, but rather occur in saccades. However, we can move our eye smoothly when tracking a moving object. This smooth pursuit utilizes a part of the vestibulo-ocular reflex (VOR) pathways and require a visual input to the occipital cortex in order to lock the eyes onto the target. 

  The fixation reflexes and optokinetic reflexes use the same path as smooth pursuit movements. Fixation reflex refers to the ability to fixate eyes on a moving target. It compensates the VOR to stabilize the eyes when the head tracks the moving target. The optokinetic reflex (or optokinetic nystagmus; OKN) is an involuntary fixation on moving objects.  

Vestibulo-ocular reflex



[1] Optokinetic nystagmus:  

Classification of Eye Movements based on their functions


Our eyes move due to following reasons:

- To keep visual images as stable as possible on the retina.

- To change the direction of gaze.

- To prevent the fading of retinal images.

Stabilization of images 

  If our eyes fail to keep stable the visual images on the retina, it leads a motion smear. With the motion smear, we often fail to judge object location in space since the images we accepted become a blur. Vestibular-Ocular Reflex (VOR) and Optokinetic Nystagmus (OKN) are representative eye movements to stabilize images on the retinas.

 - Vestibular-Ocular Reflex (VOR): This reflex is to stabilize the gaze during head or body movement by producing eye movements in the direction opposite to head or body movement, thus preserving the image on the center of the retina. VOR can be classified into two phases: slow phases and fast phases. Most of VOR in natural cases is a slow phase which cancels the head rotation to keep the gaze steady. When a head movement carries the eye too far to handle with only slow phase, a fast phase which is a saccade recenters the eye past primary position to anticipate continued motion. (*Comatoes patients show slow phase but fast phase; eye travels to an edge and stays there.)

- Opto-Kinetic Nystagmus (OKN): This is also called the Opto-Kinetic Reflex (OKR), or Parade nystagmus, or Railway Nystagmus. OKN is elicited by periodic visual stimuli drifting across the subject's visual field. When we ride on a train, we can observe objects like trees coming closer to us. To preserve stable image on a retina, the eye tracks the objects in the direction of their movement until the eye at an extreme position in orbit (slow pursuit, Ocular-Following Response (OFR)). Then, the eye rapidly moves in opposite direction to look at a new object (fast, saccades movement). 

Changes in gaze direction

 If our interest moves from one to another, we also move our fovea to the new object of interest. In order to move and fixate the eye to a new target, we often use Saccades, Pursuits, and Vergences. 

- Saccade: This means a quick, simultaneous movement of both eyes from one to another position. (It also serve as a mechanism for the fast phase of optokinetic nystagmus as referred above.)

- Pursuit: This is also called smooth pursuit which allows the eyes to follow a moving object. Most people are not able to initiate the pursuit without a target. If a target moves greater than 30˚/s, catch-up saccades are often required in pursuit movement. Smooth pursuit is asymmetric: most humans tend to be better at horizontal than vertical pursuit and better at downward than upward pursuit. 

- Vergence: A vergence is the simultaneous movement of both eyes in opposite directions to obtain or maintain single binocular vision. To look at the nearby object, the eyes rotate towards each other (convergence), whereas to look at the object far away, the eyes rotate from each other (divergence). As opposed to the 500˚/s velocity of saccade movements, vergence movements are far slower, around 25˚/s.

Preventing the fading of retinal images

  When an image is stabilized on the retina by one means or another, it soon faded and disappears. A similar fading phenomenon is the Troxler's fading.  When you fixate your eyes to a particular point for a while, unchanging nearby images will fade away and disappear.  This fading phenomenon has been attributed to the adaptation of visual neurons. To avoid such disappearance, the nervous system carries out a mechanism called fixational eye movement, which continuously stimulates neurons in the early visual areas of the brain responding to transient stimuli. Miniature ocular movements are as follows:  

- Drift: Ocular drift is the fixational eye movement characterized by a smoother, slower, roaming motion of the eye when fixed on an object. The exact movement of ocular drift is often compared to Brownian motion, which is the random motion of a particle suspended in fluid as a result of its collision with the atoms and molecules that comprise that fluid. Ocular drifts occur incessantly during intersaccadic fixation. The frequency of ocular drifts is a range of 20 to 40 Hz. 

- Ocular Micro-Tremor (OMT): OMT is a constant, high frequency, low amplitude eye tremor occurring at frequencies in a range of 40 to 100 Hz. In a coma, there is a loss of high-frequency components of tremor and the extent of this reduction is related to the patient's prognosis. 

Microsaccade: This is also known as "flicks" which is saccades, involuntarily, produced during the fixation periods.  It is the largest and fastest within the fixational eye movements. Like saccades, microsaccades are usually binocular, and conjugate movements with comparable amplitudes and directions in both eyes. The only way to distinguish microsaccades from saccades is by the time in which they happen: during fixation. Regular saccades are produced during the active exploration of the eye, during non-fixation tasks whereas microsaccades are only produced during fixation tasks. 

  Note that the existence of these movements has been known since the 1950s, only recently their functions have started to become clear. 










vvouch: 보증하다

tome : 두꺼운 책

quench: 풀다, 해결해주다

I seek knowledge, which I value more than life itself. I've a thirst no dusty old tomes can quench. 

magnum opus: 작가의 대표작

I wish to see the Nilfgaardian invasion with my own eyes, understand it, and record it all in my chronicle, my magnum opus. 

trinket: 장신구

garment: 의복

Rape and cruelty are details of no import to the war's course. Trinkets on the garment of conlict, one might say.  

by trade: 직업상

A simple innkeep by trade, but a true maestro when it comes to gwent. 

lift the spirit: 힘이나게 하다.

It'll lift your spritis.

haggard: 초췌한

You look haggard. It's just a few drops to improve your mood. A little alcohol's never hurt a soul. 

cut to the chase: 본론으로 들어가다

Can we cut to the chase?

Let's cut to the chase. 

vagrant: 부랑자

As a vagrant I deserve no explanation. 

garrison: 수비대, 주둔지

A Nilfgaardian scout from the local garrison saw her. 

terse: 간결한

Had a terse exchange with the garrison commander and raced off. 

missive: 길거나 공식적인 편지 , 서한

heed: 주의를 기울이다.

tribunal: 재판소, 법원

scribbled: 아무렇게나 갈겨쓴

replenish: 다시 회복하다, 비축하다, 연료를 보급하다

replenish: 질문 심문 의문

fierce: 사나운, 험악한

sloth: 나무늘보

quarrel: 언쟁, 말다툼

brooding: 음울한

nothing to sneeze at : 가볍게 볼 수 없는, 만만치 않은

knack: 재주, 요령 

sod it : 제기랄! , 빌어먹을!

feal-bitten: 사소한

slob: 게으름뱅이

composed: 담담하다, 침착하다

hideout: 은신처

helmsman: 조타수

parrot: 앵무새

tarry: 지체하다

venture: 모험하다, ~위험을 무릎쓰다

at any rate: 어쨌든

lass: 아가씨

natter: 수다를떨다, ~에게 재잘거리다

tome: 두꺼운 책

decipher: 해독하다.

woeful: 슬픈, 비통한

lament: 통탄하다, 한탄하다

commemorating: 중요한 사건을 기념하다

'Cat.Study Room > SubCat.English' 카테고리의 다른 글

10.16 medieval words  (0) 2017.10.16
2017.04.03. English Writing Practice.  (0) 2017.04.03
How to write a good newspaper article?  (0) 2016.12.12
Conversation Note - 2016. 06. 20.  (0) 2016.06.20
Conversation Note - 2016. 06. 10.  (0) 2016.06.10
Conversation note - 2016.06.08.  (0) 2016.06.08

0. Requirements

 Sample code named 'D3D12HelloTriangle' which was downloaded in lecture 1. (Link)

1. Intro

   In the file 'D3D12HelloTriangle.cpp', we can find many functions. Among them, following four functions form a basic framework: 

- Oninit(): initialize the directx12 rendering environment. 

- OnUpdate(): update frame-based values such as animation matrix. 

- OnRender(): render the scene.

- OnDestroy(): release resources.

 Let's look at the components one by one. 

2. Oninit function

  Oninitfunction contains two additional sub-functions. LoadPipeline() and LoadAssets(). Let's take a closer look at the Loadpipeline() function. 

1) Loadpipeline()

1-1) Enabling the debug layer

  First, the code enables the debug layer by using Microsoft::WRL::ComPtr. 

1-2) CreateFactory

  Next, create a DXGI factory. It is an object that is capable of creating other DXGI objects. 

1-3) CreateDevice

  Then, DXGI device is created. To create device, adapter, and feature level is required. In the sample code, two types of adapter (warpAdapter and hardwareAdapter) and feature level 11 are used. 

1-4) Command Queue

  Command queue is the ordering of the commands. In the D3D11, both the immediate context and deferred context are supported. However, the immediate context is no longer supported by D3D12,  In the concept of deferred context, commands are queued up and run at a later time. For example, in multi-thread application, each threads can generate commands in parallel, and the commands are mounted on an API object called 'Command Queue'. We call it as a command parallelism. 

  Let's take a closer look at command queues and command lists. In D3D12, the process of transferring commands differes from D3D11 in three important ways: (For more details, you can visit the page: (Link) https://msdn.microsoft.com/en-us/library/windows/desktop/dn899114(v=vs.85).aspx

 1. Elimination of the immediate context. This enables multi-threading. 

 2. Apps own how rendering calls are grouped into GPU work items. This enables re-use.

 3. Apps explicitly control when work is transferred to the GPU. This enables item 1 and 2. 

   As mentioned above, D3D12 no longer supports immediate context. Instead, to render, command lists are used. A command list looks similar to the immediate context which is used in D3D11. Actually, they are similar. They contains commands such as drawing primitives or changing rendering state. However, command lists can be recorded to command queue concurrently, which takes advantage of multi-core processors. If the same process repeats over and over, a command list can be executed multiple times. 

0. Requirements


- Windows 10 (please keep your windows up to date.)

- Visual studio 2017 with the windows 10 creator update SDK  (previous version also maybe programmable, but 2017 is recommended.)

1. Intro

 The simplest way to learn new language is to run sample code. Therefore, let's download dx12 sample code from git. Following link allows to download many samples.


2. Run sample

  Now, let's run the sample code. In this posting, we are going to execute 'D3D12HelloTriangle'. Let's open it. The code sample is placed in the following URL.


Then, you can find the 'D3D12HelloWorld.sin'. Open it. There are several sample projects.  Now, please follow the instructions:

1) Click the mouse right button on the project named 'D3D12HelloTriangle' and select the 'Set as startup project'. 

2) Press the F5 button *^^*! (If it does not work, please follow further instructions)

3) If you have problems, maybe some requirements are missed or properties are set wrong. check followings

  3-1)  Does your operating system (windows 10) provides the latest windows SDK version? (The latest version on 2017.04.13 is  10.0.15063.0.) You can identify it from  Right click on Projects->property->Configuration Properties->General->Windows SDK Version. (You can change the SDK version by clicking its panel.)

  3-2)  Does your project use right platform toolset? You can identify it from  Projects->property->Configuration Properties->General->Platform Toolset.  You can use v120 for Visual studio 2015 and v141 for Visual studio 2017. 


*Include directory and library is already set in a right way because it is a sample code. So, you may not need to configure those things. 

 *If any problem occur, please leave reply. 

It is a critical mistake we've done easily that we assume that we already know what people think.   

-> It is a critical mistake (we can easily make/we tend to make/we are prone to make) to assume that we already know what people think.

-> To assume that we already know what people think is a critical mistake we are prone to make. 

Making brief time to write sincere words once a week will bring you something meaningful.


Most people do not appreciate/acknowledge that Washington was a wise military leader.  

-> Washington is usually not acknowledged as a wise military leader.  

Losing moisture from excretion and evaporation must be continuously replaced.

-> Moisture organisms lose through excretion and evaporation must be continuously replaced. 

What makes us real human? 

-> What makes us really/truly human?

More similar point is that two subway systems cover the wide area with cheap fee for commuters.

->  More similar point is that two subway systems cover wide area at a cheap fee for commuters.

-> A further similarity is that two subway systems cover wide area at a low cost for commuters.


'Cat.Study Room > SubCat.English' 카테고리의 다른 글

10.16 medieval words  (0) 2017.10.16
2017.04.03. English Writing Practice.  (0) 2017.04.03
How to write a good newspaper article?  (0) 2016.12.12
Conversation Note - 2016. 06. 20.  (0) 2016.06.20
Conversation Note - 2016. 06. 10.  (0) 2016.06.10
Conversation note - 2016.06.08.  (0) 2016.06.08

Step 1. Define

 CB_BANDWIDTH*        pcbBandwidth = NULL; //CB_BANDWIDTH is a structure for transmitting. 

        ID3D11Buffer*                                     bandwidthBuffer = NULL;

ID3D11ShaderResourceView*       bandwidthBuffer_RV = NULL;

Step 2. Set buffer and its shader resource view


        D3D11_BUFFER_DESC Desc2;

Desc2.Usage = D3D11_USAGE_DYNAMIC;


Desc2.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;

Desc2.MiscFlags = 0;

Desc2.ByteWidth = sizeof(CB_BANDWIDTH);

V_RETURN(pd3dDevice->CreateBuffer(&Desc2, NULL, &bandwidthBuffer));

D3D11_SHADER_RESOURCE_VIEW_DESC rd; //never replace this thing into NULL. 

ZeroMemory(&rd, sizeof(rd));

rd.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;

rd.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;

rd.Buffer.FirstElement = 0;

rd.Buffer.NumElements = 7;

pd3dDevice->CreateShaderResourceView(bandwidthBuffer, &rd, &bandwidthBuffer_RV);

Step 3. Fill the data

//Set constant buffer


pd3dImmediateContext->Map(bandwidthBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource);

  pcbBandwidth = (CB_BANDWIDTH*)MappedResource.pData; //CB_BANDWIDTH is a structure for transmitting. 

  pcbBandwidth.data = somedata;

Step 4. Set shader resource and unmap

  pd3dImmediateContext->PSSetShaderResources(77, 1, &bandwidthBuffer_RV); // 77 is a register number. you can set in the shader. 

               // In this example, tbuffer is set to only for pixel shader, 

  pd3dImmediateContext->Unmap(bandwidthBuffer, 0);                       

Step 5. Define the CB_BANDWIDTH in the hlsl shader code with 77 register. 

tbuffer CB_BANDWIDTH : register(t77)


Bandwidth bandwidth; //must be synchronized with definition in the cpp code. 


Note that, the detailed description of CB_BANDWIDTH and Bandwidth structure is omitted. They can be replaced by simply float4.  

This posting introduces various methods for measuring stochastic similarity between two groups A and B. 

1. Goodness-of-fit


   Goodness-of-fit is widely used to test whether two samples have identical (or similar) distribution. The goodness-of-fit of a statistical model describes how well it fits a set of observations. Measures of goodness-of-fit summarize the discrepancy between observed values and the values expected under the model in question. A goodness-of-fit statistic tests the following hypothesis:

   H_0: the model M_0 fits

   H_A: the model M_0 does not fit(or, some other model M_A fits)

We call H_0 as a null hypothesis and H_A as a alternative hypothesis. 

  In assessing, there are two cases :

1. when the distribution of sample B is known, and

2. when the distribution of sample B is unknown. 

At first, let's assume that group B has known distribution, Gaussian(normal) distribution. 

1-1. Normality Test

 In statistics, normality tests are used to determine if a data set is well-modeled by a normal distribution and to compute how likely it is for a random variable underlying the data set to be normally distributed. For this, following tests are available.

- D'agostin's K-squared test

- Jarque-Bera test

- Anderson-Darling test

- Cramer-von Mises criterion

- Lilliefors test

- Kolmogorov-Smirnov test

- Shapiro-Wilk test

- Pearson's chi-squared test


In [Razali et.al. 2011: "Power comparisons of Shapiro–Wilk, Kolmogorov–Smirnov, Lilliefors and Anderson–Darling tests"], Shapiro-Wilk has the best power for a given significance, followed closely by Anderson-Darling when comparing the Shapiro-Wilk, Kolmogorov-Smirnov, Lilliefors, and Anderson-Darling tests. Therefore, we will check those four tests. 

Shafiro test

Anderson-darling test


Null hypothesis?


Difference between One-way ANOVA & Two-way ANOVA

One-Way ANOVA: An ANOVA hypothesis tests the difference in population means based on one characteristic or factor. a----->b "An example of when a one-way ANOVA could be used is if you want to determine if there is a difference in the mean height of stalks of three different types of seeds. Since there is more than one mean, you can use a one-way ANOVA since there is only one factor that could be making the heights different. " Two-Way ANOVA: An ANOVA hypothesis tests comparisons between populations based on multiple characteristics. a---->c<----b "Suppose that there are three different types of seeds, and the possibility that four different types of fertilizer is used, then you would want to use a two-way ANOVA. The mean height of the stalks could be different for a combination of several reasons" Multivariate analysis of variance (MANOVA): it is simply an ANOVA with several dependent variables. That is to say, ANOVA tests for the difference in means between two or more groups, while MANOVA tests for the difference in two or more vectors of means. a----->c, b------>d, a----->d, b----->c 

+ Recent posts