text:
## cadview – 2: Running on Windows

Here are two examples of cadview clients running on Windows. The first is simply the earlier gladeui sample built on Windows using MSVC. Headers and libraries for GTK+ (http://www.gtk.org/download/win32.php) need to be installed. A VC++ project [1] was created to refer to the gladeui source files. The project is located at /src/msvc/gladeui. No significant changes were made to the gladeui source.

The second example is called winui and talks directly to the Windows API and GDI+. When handling paint events we require an object using which to perform graphics output. In the GTK+ case, I could simply create the cairo_t object within the handler. In case of the Windows API, the output must be performed via an HDC which is passed as a parameter with the WM_PAINT event. In order to accommodate this, cad_gui_view::paint was modified to take a cad_gui_view::graphics_type& as a parameter. winui is located at /src/msvc/winui in the repo.

1. ^ I had to fall back on a handcrafted MSVC build since CMake failed to find GTK+ and Boost on Windows. The MSVC solution can be found at /src/msvc/msvc.sln within the repository. boost::regex (http://www.boostpro.com/download/) headers and libraries need to be installed for both examples.

cadview is a C++ library which provides a cross-platform GUI widget for 2D drafting. Presently, the following features are supported:

• Zoom/Pan
• Polyline tool
• Entering x,y co-ordinates via mouse selection or text entry

## Installation

No installation packages are available yet and the executable has to be built from source. cadview depends on the following tools and libraries:

On a Fedora 16/17 machine, you can install the above dependencies as follows:

Obtain the source using Mercurial as follows:

This should place the source in a directory named cadview in your current directory. To build the binaries:

Select File>Polyline to activate the polyline tool. The UI controls are as follows:

• Click to add a point to the polyline
• A point can also be added by entering an x,y co-ordinate pair in the textbox and hitting <Enter>
• Pan by holding down the middle mouse button
• Zoom by turning the mouse wheel
• Right-click or hit <Esc> to end the polyline

## Design Overview

The visible area of the widget – the view – is represented by the cad_gui_view class. cad_gui_view does not interact directly with the underlying GUI but instead depends on a pair of adaptor classes for GUI facilities.

The first adaptor class is the template parameter U of cad_gui_view and provides facilities like getting the position of the mouse cursor (get_mouse_position) and invalidating the view (invalidate). The second adaptor class is the U::graphics_type type. This type provides facilities to draw on screen (draw_polyline, move_to, line_to) and converting between screen and world co-ordinates (device_to_user).

The cad_gtk_adaptor is an implementation of the first adaptor class (the U parameter) using GTK+. cad_cairo_graphics implements the U::graphics_type using cairo. In a similar way, we can create adaptors for other GUI platforms (e.g. cad_windows_adaptor to wrap around Windows API and cad_windows_graphics to talk to an HDC).

## Test if a Point lies inside a Polygon (from CGA FAQ)

The CGA FAQ describes an algorithm to test if a point lies within a polygon. Roughly speaking, you start from the point and travel north. If you cross an odd number of sides, it means that you were within the polygon when you started and vice versa.

The details of the solution can be found in the CGA FAQ linked above. A C++ implementation can be found here: http://code.google.com/p/curve-project/source/browse/trunk/lab/cgafaq/cgafaq.h The function cgafaq::point_in_polygon takes a point and a polygon and returns whether or not the point lies inside the polygon. This is a direct translation of the code from the FAQ.

Disclaimer: This post and the code provided are not endorsed by any of the contributors to the CGA FAQ.

## Orientation of Polygons (from CGA FAQ)

The orientation of a polygon tells us if the vertices are ordered clockwise or counter-clockwise as we move along the perimeter. This is determined by calculating the polygon’s signed area which is positive for counter-clockwise orientation and negative for clockwise orientation. A quicker algorithm is to determine the signed area of the triangle formed by the lowest right most vertex and it’s immediate neighbors.

The details of the solution can be found in the CGA FAQ linked above. A C++ implementation can be found here: http://code.google.com/p/curve-project/source/browse/trunk/lab/cgafaq/cgafaq.h The function cgafaq::orientation has two overloads. The first computes orientation for three vertices and the second calculates the orientation of a polygon.

Disclaimer: This post and the code provided are not endorsed by any of the contributors to the CGA FAQ.

## Perpendiculars

I often need to construct perpendiculars in my code and found a very elegant solution to this problem in CGAL source.

Given points A(xa, ya) and B(xb, yb), perpendiculars BBccw and BBcw to the line AB can be constructed at B using either of the following points:

Bccw(xb – (yb – ya), yb + (xb – xa)) // such that ABBccw is oriented counter-clockwise

or

Bcw(xb + (yb – ya), yb – (xb – xa)) // such that ABBcw is clockwise.

This follows from the fact that the product of the slopes of perpendicular lines is -1.

Here is code to return either of these points.

Output:

format: plain


text:
# Expected value of Rayleigh

#### alman9898

1. The problem statement, all variables and given/known data
A density function used is:

$$f(y) = \frac{2y}{\theta}e^{\frac{-y^{2}}{\theta}} y > 0$$

using method of transformations find:

(a) pdf of U = Y^2
(b) E(Y) and V(Y)

2. Relevant equations
f(u) = f(h^-1(u))*|dh^-1/du|
h^-1(u) = sqrt(u)

3. The attempt at a solution

The pdf Y^2 ~ exp(theta)

E(Y) = E(U^1/2).

That is:

$$\int\frac{1}{\theta}u^{1/2}e^{\frac{-u}{\theta}}$$

So, multiply by sqrt(theta)/sqrt(theta) and group terms...

$$\frac{\sqrt{\theta}}{\theta}\int\sqrt{\frac{u}{\theta}}e^{\frac{-u}{\theta}}$$

The integral is the Gamma function with parameter 3/2. So I get...

sqrt(PI/THETA)/2 as the answer....but a little internets research reveals the expected value *should* be sqrt(PI * THETA)/2. I can't find out where my math went wrong, it's something stupid but I've been stuck for a whole day...

Related Calculus and Beyond Homework News on Phys.org

#### LCKurtz

Homework Helper
Gold Member
Try changing the variable from u to s by letting $s = u/\theta,\ du = \theta ds$:

$$\int_0^\infty\frac 1 \theta e^{-\frac u \theta}\, du= \int_0^\infty\frac 1 \theta(\theta s)^{\frac 1 2}e^{-s}\theta\, ds = \int_0^\infty\sqrt{\theta}s^{\frac 1 2}e^{-s}\,ds = \sqrt\theta\ \Gamma(\frac 3 2)$$

#### alman9898

That helps alot, but if it wasn't for checking my work I would've been surely wrong. Any idea why my method didn't work; it's a trick my professor uses to solve problems with 'known' solutions.

#### Dick

Homework Helper
It's because the gamma function is the integral of sqrt(v)*exp(-v)*dv. Or the integral of sqrt(u/theta)*exp(-u/theta)*d(u/theta). Not the integral of sqrt(u/theta)*exp(-u/theta)*du. The last one is what you were putting to be gamma(3/2). That's not right. You are off by a factor of theta because you didn't change the integration variable. Probably happened because you were omitting the d(something) after your integrals.

Last edited:

#### alman9898

Ok I understand it now. That clears up a lot, and explains the missing term I needed to make things all nice. (I would have another theta term in the numerator to cancel the one out in the denominator).

"Expected value of Rayleigh"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving


text:
## Files in this item

FilesDescriptionFormat

application/pdf

5368.pdf (23kB)
(no description provided)PDF

## Description

 Title: Laser Induced Fluorescence Measurements Of Vibrationally Excited Oxygen Produced By Recombination Of O Atoms Author(s): Orr, Keegan Contributor(s): Adamovich, Igor V.; Paul, Anam C.; Yang, Xin; Jans, Elijah R.; van den Bekerom, Dirk Subject(s): Dynamics and kinetics Abstract: Vibrationally excited oxygen and nitrogen have been long recognized to be of critical importance in nonequilibrium high-enthalpy flows, primarily encountered behind hypersonic shock waves. To date, no direct experimental verification of vibrational state resolved dissociation rates predicted by different kinetic models has been undertaken, in large part due to the difficulty of measuring these rates directly. We present a framework where state specific recombination rates can be inferred from the time-resolved measurements of O$_2$ vibrational populations, such that the state specific dissociation rates can be obtained from the detailed balance. In the present approach, recombination reactions of atomic oxygen are monitored in the afterglow of a diffuse ns pulse discharge burst in an O$_2$-Ar mixture. The time evolution of O$_2$(v) populations in the recombining mixture are measured by ps Laser Induced Fluorescence (LIF) in the O$_2$($B^3\Sigma_u^-$,v’=0 $\leftarrow$ $X^3\Sigma_g^-$, v”) Schumann-Runge bands, with absolute calibration by NO($A^2\Sigma^+$, v’=0 $\leftarrow$ $X^2\Pi$, v”=0) LIF. By varying the output wavelength of the ps laser / Optical Parametric Oscillator (OPO) system used for the excitation in the 250-450 nm range, levels from v”=7 to 21 have been detected. Two-photon Absorption LIF (TALIF) at 226 nm has been used to measure the atomic oxygen concentration, with absolute calibration by Xe. Within $\sim$1 ms after the discharge burst, a rapid decay of O$_2$(v) is observed, indicating vibration-vibration (V-V) and vibration-translation (V-T) relaxation of vibrational states populated by electron impact and by quenching of the excited electronic states of Ar. After the rapid initial decay, the vibrational populations level off and remain nearly constant, or exhibit a transient rise, on the timescale of about 10 ms, suggesting the presence of a persistent source of vibrational excitation due to chemical reactions. In addition to O atom recombination to form vibrationally excited O$_2$ molecules, at low temperatures atomic oxygen may also recombine with O$_2$ and form ozone. The latter may well generate vibrationally excited O$_2$ in O + O$_3$ $\rightarrow$ O$_2$ + O$_2$ reaction, which would therefore affect the present results. Ozone formation is controlled by preheating the excited mixture up to 600 K, as well as increasing the pressure and reducing the O$_2$ mole fraction, when the production of ozone is reduced significantly. Issue Date: 2021-06-23 Publisher: International Symposium on Molecular Spectroscopy Genre: Conference Paper / Presentation Type: Text Language: English URI: http://hdl.handle.net/2142/111190 Date Available in IDEALS: 2021-09-24


text:
# Floor problems

Number Theory Level 4

How many integers from 1 to 1000 inclusive are there in the form $$\left\lfloor 2n \right\rfloor +\left\lfloor 3n \right\rfloor$$ for any positive real number $$n$$?

×

Problem Loading...

Note Loading...

Set Loading...


text:
ID 683176
Date 9/24/2018
Public

## 6.2. Kernel Vectorization

To achieve higher throughput, you can vectorize your kernel. Kernel vectorization allows multiple work-items to execute in a single instruction multiple data (SIMD) fashion. You can direct the to translate each scalar operation in the kernel, such as addition or multiplication, to an SIMD operation.

Include the num_simd_work_items attribute in your kernel code to direct the offline compiler to perform more additions per work-item without modifying the body of the kernel. The following code fragment applies a vectorization factor of four to the original kernel code:

__attribute__((num_simd_work_items(4)))
__attribute__((reqd_work_group_size(64,1,1)))
__kernel void sum (__global const float * restrict a,
__global const float * restrict b,
{
size_t gid = get_global_id(0);

}

To use the num_simd_work_items attribute, you must also specify a required work-group size of the kernel using the reqd_work_group_size attribute. The work-group size you specify for reqd_work_group_size must be divisible by the value you assign to num_simd_work_items. In the code example above, the kernel has a fixed work-group size of 64 work-items. Within each work-group, the work-items are distributed evenly among the four SIMD vector lanes. After the offline compiler implements the four SIMD vector lanes, each work-item now performs four times more work.

The offline compiler vectorizes the code and might coalesce memory accesses. You do not need to change any kernel code or host code because the offline compiler applies these optimizations automatically.

You can vectorize your kernel code manually, but you must adjust the NDRange in your host application to reflect the amount of vectorization you implement. The following example shows the changes in the code when you duplicate operations in the kernel manually:

__kernel void sum (__global const float * restrict a,
__global const float * restrict b,
{
size_t gid = get_global_id(0);

answer[gid * 4 + 0] = a[gid * 4 + 0] + b[gid * 4 + 0];
answer[gid * 4 + 1] = a[gid * 4 + 1] + b[gid * 4 + 1];
answer[gid * 4 + 2] = a[gid * 4 + 2] + b[gid * 4 + 2];
answer[gid * 4 + 3] = a[gid * 4 + 3] + b[gid * 4 + 3];
}

In this form, the kernel loads four elements from arrays a and b, calculates the sums, and stores the results into the array answer. Because the FPGA pipeline loads and stores data to neighboring locations in memory, you can manually direct the offline compiler to coalesce each group of four load and store operations.

Attention: Each work-item handles four times as much work after you implement the manual optimizations. As a result, the host application must use an NDRange that is four times smaller than in the original example. On the contrary, you do not need to adjust the NDRange size when you exploit the automatic vectorization capabilities of the offline compiler. You can adjust the vector width with minimal code changes by using the num_simd_work_items attribute.


text:
Phonetics/음성학

# Japanese and Korean speakers’ production of Japanese fricative /s/ and affricate /ts/*

Kimiko Yamakawa1,**, Shigeaki Amano2
1Faculty of Contemporary Culture, Shokei University, Kumamoto, Japan
2Faculty of Human Informatics, Aichi Shukutoku University, Aichi, Japan
**Corresponding author : jin@shokei-gakuen.ac.jp

© Copyright 2022 Korean Society of Speech Sciences. This is an Open-Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0/) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Received: Jan 24, 2022; Revised: Mar 15, 2022; Accepted: Mar 15, 2022

Published Online: Mar 31, 2022

## Abstract

This study analyzed the pronunciations of Japanese fricative /s/ and affricate /ts/ by 24 Japanese and 40 Korean speakers using the rise and steady+decay durations of their frication part in order to clarify the characteristics of their pronunciations. Discriminant analysis revealed that Japanese speakers' /s/ and /ts/ were well classified by the acoustic boundaries defined by a discriminant function. Using this boundary, Korean speakers' production of /s/ and /ts/ was analyzed. It was found that, in Korean speakers' pronunciation, misclassification of /s/ as /ts/ was more frequent than that of /ts/ as /s/, indicating that both the /s/ and /ts/ distributions shift toward short rise and steady+decay durations. Moreover, their distributions were very similar to those of Korean fricatives and affricates. These results suggest that Korean speakers’ classification error might be because of their use of Korean lax and tense fricatives to pronounce Japanese /s/, and Korean lax and tense affricates to pronounce Japanese /ts/.

Keywords: affricate; fricative; non-native speaker; production boundary

## 1. Introduction

The Japanese language has a voiceless alveolar fricative /s/ and voiceless alveolar affricate /ts/ (Table 1) (cf. Kubozono, 2015; Vance, 2008). These two consonants have similar spectral features: Both consist of frication noise in a frequency region higher than about 4 kHz. However, they differ in intensity envelope. /s/ tends to have a gentle onset and a long sustained duration in the intensity envelope, whereas /ts/ tends to have a steep onset and a short sustained duration.

Table 1. Voiceless fricatives and affricates in Japanese and Korean languages related to this study
Language Fricative Affricate
Alveolar Alveolo-palatal Alveolar Alveolo-palatal
Japanese s ɕ ts
Korean Lax Tense Lax Tense Aspirated
s s* * h

Unlike the Japanese language, the Korean language distinguishes a lax alveolar fricative /s/ and tense alveolar fricative /s*/ (Table 1) (Ha et al., 2009; Shin, 2015). /s/ has a longer frication duration than /s*/ at a word-initial position (Kang, 2000; Shin, 2015). /s*/ has a longer aspiration duration than /s/ at a word-initial position but it has no aspiration at a word-medial position (Shin, 2015). Additionally, the centroid of the fricative noise is lower for /s/ than for /s*/ (Cho et al., 2002). Further, in contrast to Japanese, Korean does not have an alveolar affricate /ts/. However, it does have a lax alveolo-palatal affricate /tɕ/, tense alveolo-palatal affricate /tɕ*/, and aspirated alveolo-palatal affricate /tɕh/ (Ha et al., 2009; Shin, 2015). At a word-initial position, /tɕ*/, /tɕ/, and /tɕh/ have a short, medium, and long frication duration, respectively (Shin, 2015). At a word medial position, this order of frication duration is retained. However, /tɕ/ can be pronounced as a voiced affricate between voiced sounds. In addition, /tɕ/, /tɕh/, and /tɕ*/ have a short, medium, and long closure duration, respectively (Shin, 2015).

The perceptual assimilation mode for second language learners (PAM-L2) proposed by Best & Tyler (2007) predicts that speakers of native language (L1) have difficulties in discriminating phonemes in a foreign language (L2) when two phonemes in L2 are perceived to one phoneme in L1 with equal goodness or when L2 phonemes are not perceived as any L1 phoneme. According to PAM-L2 expectations, it is often observed that non-native speakers of any language have difficulty in pronouncing a foreign-language phoneme that does not exist in their first language. For example, Japanese speakers struggle to correctly pronounce English /l/ and /r/ that does not exist in Japanese (Zimmermann et al., 1984). Since the Korean language does not have an alveolar affricate /ts/ (Table 1), Korean speakers may have difficulty pronouncing Japanese /ts/. Actually, previous studies conducting a questionnaire survey for Japanese teachers on non-native Japanese learners (e.g., Matsuzaki, 1999; Sukegawa, 1993) reported that Korean speakers are not good at distinguishing Japanese /s/ and /ts/.

There are two types of pronunciation error: mispronunciation of /s/ as /ts/ (hereafter /s/→/ts/ error) and mispronunciation of /ts/ as /s/ (hereafter /ts/→/s/ error). The previous studies (e.g., Matsuzaki, 1999; Sukegawa, 1993) often reported the /ts/→/s/ error whereas rarely the /s/→/ts/ error. However, this cannot be evidence that the /s/→/ts/ error never occurs. Previous studies possibly overlooked the /s/→/ts/ error because the /ts/→/s/ error draws Japanese teachers’ attention, and hence it might mask the occurrence of the /s/→/ts/ error.

Another problem of previous studies (e.g., Matsuzaki, 1999; Sukegawa, 1993) is that they mainly investigated the occurrence and characteristics of the error of /s/ and /ts/, but not the error in terms of acoustic features. The acoustic features related to the cause of Korean speakers’ mispronunciation have not been clarified.

As for the acoustic features of /s/ and /ts/, Yamakawa et al. (2012) analyzed the intensity envelope of /s/ and /ts/ pronounced by native Japanese speakers and developed a method to distinguish the two consonants. They divided the intensity envelope into the rise, steady, and decay components, and then approximated these three components with lines of positive, zero, and negative slope, respectively (Figure 1). Yamakawa et al. (2012) demonstrated that /s/ and /ts/ are discriminated with a small error (1.2−6.1%) by a linear function with two variables: the rise duration and the sum of the steady and decay durations (hereafter referred to as “steady+decay”). Their results indicate that the rise and steady+decay durations are relevant acoustic features to distinguish Japanese /s/ and /ts/. Yamakawa & Amano (2015) demonstrated that the method of Yamakawa et al. (2012) is applicable to the distinction between fricative /ɕ/ and affricate /tɕ/. Namely, they showed that these consonants are separated with low confusion errors when using the rise and steady+decay durations.

Figure 1. Schematic diagram of the intensity envelope and the duration of the consonant parts for analysis.

Based on these backgrounds, this study aimed to clarify the acoustic characteristics of Japanese fricative /s/ and affricate /ts/ pronounced by the introductory level of Korean learners of Japanese using the two variables (rise and steady+decay durations) proposed by Yamakawa et al. (2012). In this study, the “production boundary” is defined as an acoustic boundary obtained by discriminant analysis using the rise and steady+decay durations. The “pronunciation error” is defined as a classification error using the production boundary as a classifier. This study firstly obtained Japanese and Korean speakers’ mapping of /s/ and /ts/ and their production boundaries on a coordinate plane of the rise and steady+decay durations. Then, using the Japanese speakers’ production boundary, Korean speakers’ pronunciation error of Japanese /s/ and /ts/ was identified to examine their characteristics. To obtain further information about the cause of pronunciation error, this study also analyzed Korean fricatives and affricates in a monosyllable pronounced by Korean speakers.

## 2. Speech Recording

2.1. Participants

The participants in the experiment were 24 Japanese speakers (12 males and 12 females) and 40 Korean speakers (20 males and 20 females). Their average age was 26.2 years [Minimum(Min)=21, Maximum(Max)=30, standard deviation(SD)=3.2] for the Japanese speakers, and 24.2 years (Min=19, Max=29, SD=2.6) for the Korean speakers. The Korean speakers were Japanese learners at the beginner level. They had learned the Japanese language for an average of 121 hours (Min=18, Max=300, SD=75.2) and had never lived in Japan. The participants were paid for their participation.

2.2. Word Materials

The word materials used for recording were four Japanese minimal pair words in 1−4 morae long (Table 2), having the same phoneme sequence except that their initial phoneme was /s/ or /ts/. Each item of the minimal pair words had the same accent pattern and similar auditory word familiarity (Amano & Kondo, 1999). These characteristics are desirable for a speech production experiment because the word materials are probably not affected by the difference in phoneme sequence, accent pattern, or word familiarity. The word materials served for both Japanese and Korean speakers’ recordings.

Table 2. Minimal pair words with an initial phoneme /s/ or /ts/. Word meaning and auditory word familiarity are shown in parentheses and brackets, respectively
Word length (mora) Accent pattern Minimal pair words
/s/ word /ts/ word
1 H /sɯ/
(vinegar)
[4.78]
/tsɯ/
(harbor)
[3.94]
2 LH /sɯrɯ/
(do)
[5.19]
/tsɯrɯ/
(fish)
[5.34]
3 LHL /sɯnerɯ/
(sulk)
[5.66]
/tsɯnerɯ/
(pinch)
[5.78]
4 LHLL /sɯmaɡoto/
(single-string harp)
[2.22]
/tsɯmaɡoto/
(multi-string harp)
[2.53]
2.3. Monosyllable Materials

In addition to these word materials, Korean monosyllables with fricative or affricate consonant were used for recordings. The consonants were lax fricative /s/ (ㅅ), tense fricative /s*/ (ㅆ), lax affricate /tɕ/ (ㅈ), and tense affricate /tɕ*/ (ㅉ). The vowels were /ɯ/ (ㅡ) and /u/ (ㅜ). All combinations of these four consonants and two vowels yielded eight consonant-vowel type monosyllables. The monosyllable materials served only for the Korean speakers’ recordings.

2.4. Procedure

The Japanese speakers participated in speech recordings in a quiet room at the National Institute of Informatics or at the NTT Human Interface Laboratories in Tokyo, Japan. The Korean speakers participated in the recordings in a quiet room at the Medialab recording studio or at Hongik University in Seoul, Korea.

For word recordings, one of the word materials was presented at the center of a computer screen in hiragana characters in each trial. Similarly, for monosyllable recordings, one of the monosyllable materials was presented in Hangul characters (i.e., one of 스, 수, 쓰, 쑤, 즈, 주, 쯔, and 쭈). Speakers were asked to pronounce the word or monosyllable at a normal speaking rate. Their pronunciation was digitally recorded using a microphone (ECM-999, SONY, Tokyo, Japan) and an A/D converter (UA25-EX, Roland, Hamamatsu, Japan) with 16-bit quantization and 48-kHz sampling frequency, and stored as a digital audio file on a computer. The word materials were recorded four times in a random order for each participant. Namely, there were 32 recording trials for each participant. Meanwhile, the monosyllable materials were recorded only once. Their recording order was randomized for each participant. The word materials were recorded first, and then the monosyllable materials were recorded.

## 3. Analysis

3.1. Japanese Speakers

The rise and steady+decay durations of /s/ and /ts/ in a word pronounced by the Japanese speakers were obtained using the estimation method proposed by Yamakawa et al. (2012). That is, the intensity envelope of frication of /s/ and /ts/ was approximated with three lines of rise, steady, and decay parts (Figure 1) by minimizing a squared error between the envelope and lines. Then, the rise and steay+decay durations were identified according to the approximated lines. Table 3 shows the mean and standard deviation of the rise and steady+decay durations of /s/ and /ts/ pronounced by Japanese speakers.

Table 3. M and SD of the rise and steady+decay durations (ms) of Japanese /s/ and /ts/ pronounced by Japanese and Korean speakers. The number of data is also shown
Phoneme Japanese Korean
M SD M SD M SD M SD
/s/ 384 76.3 33.0 101.1 30.4 640 70.8 29.7 99.9 32.3
/ts/ 384 37.3 24.7 63.7 26.2 640 32.9 23.4 48.1 31.1

M, mean; SD, standard deviation.

Discriminant analysis for /s/ and /ts/ was conducted using the rise and steady+decay durations as independent variables and the labels /s/ and /ts/ as the dependent variable. The discriminant function of /s/ and /ts/ for the Japanese speakers was obtained as Equation 1.

$f=0.038x+0.039y-5.414$
(1)

Where f is the predicted label, x is the rise duration (ms), and y is the steady+decay duration (ms). The discriminant error (regarded as pronunciation error) of the Japanese speakers’ /s/ and /ts/ was 6.25% (Table 4). This low error ratio indicates that the discriminant analysis was successful.

Table 4. The Japanese and Korean speakers’ pronunciation error ratio (%) of /s/ and /ts/ based on the Japanese speakers’ production boundary
Speaker Error type
/s/→/ts/ /ts/→/s/ All
Japanese 8.33 (384) 4.17 (384) 6.25 (768)
Korean 19.06 (640) 6.25 (640) 12.66 (1,280)

The population of the pronounced item is shown in parentheses.

By substituting zero for f in Equation 1, the production boundary of /s/ and /ts/ in the Japanese speakers was obtained as Equation 2.

$0=0.038x+0.039y-5.414$
(2)

Figure 2 shows the Japanese speakers’ /s/ and /ts/ as well as their production boundary (Equation 2). The tokens of /s/ and /ts/ are well separated by the production boundary, which corresponds to the low errors described above. The average speaking rate of the Japanese speakers was 4.52 mora/s (SD=0.82 mora/s).

Figure 2. The Japanese speakers’ /s/ and /ts/ plotted on a coordinate plane of rise and steady+decay durations. The solid line represents the production boundary of /s/ and /ts/ (Equation 2).
3.2. Korean Speakers

As with the Japanese speakers, the rise and steady+decay durations of /s/ and /ts/ in a word pronounced by the Korean speakers were obtained using the estimation method proposed by Yamakawa et al. (2012). The mean and SD of the rise and steady+decay durations of /s/ and /ts/ pronounced by Korean speakers are shown in Table 3. Korean speakers’ discriminant function and production boundary were obtained as Equations 3 and 4, respectively.

$f=0.029x+0.027y-3.464$
(3)
$0=0.029x+0.027y-3.464$
(4)

where f is the predicted label, x is the rise duration (ms), and y is the steady+decay duration (ms). The discriminant error defined by Equation 3 was 10.47%.

Using the discriminant function of the Japanese speakers (Equation 1), the pronunciation errors of /s/ and /ts/ by the Korean speakers were identified. Namely, if f in Equation 1 was lower than zero for a /s/ item, it was identified as the /s/→/ts/ error, whereas if f was higher than zero for a /ts/ item, it was identified as a /ts/→/s/ error.

The ratios of these errors made by the Korean speakers are shown in Table 4. Their difference was tested with the z-test for two proportions. The ratio difference was significant between the Japanese and Korean speakers for the /s/→/ts/ error (z=4.65, p<.001) and for all errors (z=4.63, p<.001) but not for the /ts/→/s/ error. These results indicate that Korean speakers made more errors than Japanese speakers in the /s/→/ts/ error and all errors. The ratio difference was significant between /s/→/ts/ and /ts/→/s/ errors in the Japanese speakers (z=2.38, p<.05) and the Korean speakers (z=6.89, p<.001). These results indicate that the Japanese and Korean speakers made more errors in the /s/→/ts/ error than in the /ts/→/s/ error.

Figure 3 shows the Korean speakers’ /s/ and /ts/ and the production boundary of the Japanese speakers (Equation 2) and the Korean speakers (Equation 4). Many tokens of /s/ are plotted under the Japanese production boundary, which corresponds to the high /s/→/ts/ error ratio of the Korean speakers in Table 4. The average speaking rate of the Korean speakers was 3.96 mora/s (SD=1.21 mora/s), which is significantly slower than the speaking rate of the Japanese speakers [t(2,046)=10.55, p<.001].

Figure 3. The Korean speakers’ /s/ and /ts/ plotted on a coordinate plane of the rise and steady+decay durations. The solid and broken lines respectively represent the Japanese and Korean speakers’ production boundaries (Equations 2 and 4).

The rise and steady+decay durations of the Korean consonants /s/, /s*/, /tɕ/, and /tɕ*/ in a monosyllable pronounced by the Korean speakers were obtained using the estimation method proposed by Yamakawa et al. (2012). Figure 4 shows a scattergram of the consonants on a coordinate plane of the rise duration and the steady+decay duration. The production boundaries of the Japanese speakers (Equation 2) and the Korean speakers (Equation 4) were also plotted. The combined distribution of /s/ and /s*/ was very similar to that of the Japanese consonant /s/ pronounced by the Korean speakers in Figure 3. In addition, the combined distribution of /tɕ/ and /tɕ*/ had very similar distributions to that of the Japanese consonant /ts/.

Figure 4. The Korean speakers’ lax and tense fricatives (/s/ and /s*/) and lax and tense affricates (/tɕ/ and /tɕ*/) in a Korean monosyllable plotted on a coordinate plane of the rise and steady+decay durations. The solid and broken lines respectively represent the Japanese and Korean speakers’ production boundaries (Equations 2 and 4) of /s/ and /ts/ at an initial position of Japanese words.

When Korean fricatives (/s/, /s*/) and affricates (/tɕ/, /tɕ*/) were categorized by the Japanese speakers’ boundary of /s/ and /ts/ (Equation 2), the pronunciation error ratio was 7.5% for the fricative→affricate error, 3.8% for the affricate→fricative error, and 5.6% as a whole. Namely, as with the results in Table 4, the fricative→affricate error ratio was higher than the affricate→fricative error ratio. While, when Korean consonants /s/, /s*/, /tɕ/, and /tɕ*/ were categorized by the Korean speakers’ boundary of /s/ and /ts/ (Equation 4), the error ratio was 2.5% for the fricative→affricate error, 6.7% for the affricate→fricative error, and 4.7% as a whole. The low ratio of overall error indicated that the Korean fricatives and affricates in a monosyllable were well discriminated with the boundary derived from the Korean speakers’ /s/ and /ts/ in a word.

## 4. Discussion

This study investigated Korean speakers’ /s/ and /ts/ production using the rise and steady+decay durations estimated by the method proposed by Yamakawa et al. (2012), and analyzed their acoustic characteristics in terms of Japanese speakers’ production boundary of /s/ and /ts/. The results indicated that Korean speakers at the beginner level make more pronunciation errors of /s/ and /ts/ than Japanese speakers, showing that Korean speakers are not good at realizing Japanese /s/ and /ts/. Their low ability in discriminating /s/ and /ts/ is reasonable because the Korean language does not have /ts/.

Furthermore, the results indicated that Korean speakers make more /s/→/ts/ errors than /ts/→/s/ errors (Table 4) which means that their pronunciation of /s/ is biased toward /ts/ that has short rise and steady+decay durations. Korean speakers’ pronunciation of /ts/ is similarly biased. Their /ts/ in Figure 3 is distributed nearer to the origin of the coordinate axes than the Japanese speakers’ /ts/ in Figure 2. This result indicates that Korean speakers pronounce /ts/ with shorter durations of the rise and steady+decay part than Japanese speakers do. Taken together, both distributions of /s/ and /ts/ by the Korean speakers are shifted toward the origin compared to those of the Japanese speakers. Because of this shift, the Korean speakers’ production boundary (Equation 4) is located on the lower-left side (i.e., the origin side) of the Japanese speakers’ production boundary (Equation 2) in Figure 3.

What causes the shift of Korean speakers’ /s/ and /ts/? One possible cause for the shift of /s/ is that Korean speakers use Korean lax and tense fricatives (/s/ and /s*/) for Japanese /s/. This notion is supported by the results of /s/ and /s*/ in Korean monosyllables in Figure 4. The combined distribution of /s/ and /s*/ is similar to the distribution of Japanese /s/ in Figure 3. Furthermore, when the Japanese speakers’ production boundary of /s/ and /ts/ (Equation 2) was applied for the discrimination of Korean fricatives (/s/ and /s*/) and affricates (/tɕ/ and /tɕ*/), the fricative→affricate error ratio was higher than the affricate→fricative error ratio. A similar tendency is seen in the error ratios for Korean speakers’ /s/ and /ts/ in Table 4. These results suggest that Korean speakers use Korean fricatives /s/ and /s*/ to pronounce Japanese /s/. However, the /s/ and /s*/ in Figure 4 intrinsically have a different distribution from Japanese /s/ in Figure 2. Namely, they are distributed closer to /tɕ/, and /tɕ*/ than Japanese /s/ on the coordinate plane of the rise and steady+decay durations. As a result of the use of Korean fricatives having this characteristic, Japanese /s/ pronounced by the Korean speakers may shift toward the origin.

Meanwhile, such an alternative use for Japanese /ts/ is not available because the Korean language does not have /ts/. In that case, Korean speakers probably transfer a pronunciation manner of Korean lax and tense affricates (i.e., /tɕ/ and /tɕ*/) to pronounce Japanese /ts/ because these Korean affricates have similar acoustic features to /ts/. The Korean aspirated affricate /tɕh/ cannot be used for the transfer because Japanese /ts/ is not aspirated by default. The idea about such transfer is supported by the result that the combined distribution of Korean /tɕ/ and /tɕ*/ in Figure 4 is similar to the distribution of Japanese /ts/ pronounced by the Korean speakers in Figure 3. Furthermore, when calculated with the Japanese speakers’ production boundary, the Korean speakers showed a low affricate→fricative error rate (6.7%) similar to the /ts/→/s/ error rate (6.25%) in Table 4. These results suggest that Korean speakers transfer Korean /tɕ/ and /tɕ*/ to pronounce Japanese /ts/. Since Korean /tɕ/ and /tɕ*/ in Figure 4 intrinsically have closer distributions to the origin than Japanese /ts/ in Figure 2, the Korean speakers’ transfer may result in the shift of /ts/ toward the origin.

As described above, Korean speakers pronounce Japanese /s/ and /ts/ with a shift toward the origin. As a consequence, they make more /s/→/ts/ errors and fewer /ts/→/s/ errors. Incidentally, the low /ts/→/s/ errors do not necessarily mean that the Korean speakers’ /ts/ sounds natural. As seen in Figure 3, the Korean speakers’ /ts/ is closer to the origin than the Japanese speakers’ /ts/ in Figure 2. This means that Korean speakers pronounce /ts/ with very short rise and steady+decay durations, which correspond to the acoustic features of short duration in Korean tense affricate /tɕ*/ (Shin, 2015). The /ts/ with different acoustic features might cause an unnatural impression for Japanese speakers even though it is categorized as /ts/. This notion about naturalness should be examined in a future study.

This study is significant for instruction in Japanese pronunciation for Korean speakers because it clarifies that most Korean speakers have a common bias in pronouncing /s/ and /ts/. Korean speakers should pronounce /s/ with a longer duration of the rise and steady+ decay parts. Although a /ts/ pronunciation with a short duration of the rise and steady+decay parts does not cause an error to /s/, it may degrade the naturalness and/or intelligibility of /ts/. On this point, Korean speakers also should pronounce /ts/ with a longer duration of the rise and steady+decay parts. By teaching this knowledge to Korean speakers, their pronunciation of /s/ and /ts/ will improve. They will make fewer errors between /s/ and /ts/, and will able to pronounce /s/ and /ts/ more naturally and intelligibly.

Since the rise and steady+decay durations are time-domain variables, they probably vary with speaking rate, as would the production boundary defined by these durations. Although participants were asked to pronounce at a normal speaking rate, there might have been some speaking rate variations between participants. In particular, if the Korean speakers tended to pronounce at a faster speaking rate than the Japanese speakers, this might have caused a bias in this study because the faster speaking rate would make the duration of the rise and steady+decay shorter, causing a shift of the /s/ and /ts/ distributions toward the origin.

However, this was not the case. Korean speakers pronounced the word items at a significantly slower speaking rate than Japanese speakers as described in Section 3.2. The slower speaking rate makes the duration of the rise and steady+decay longer, and hence it cannot be the cause of the shift of /s/ and /ts/ distribution toward the origin. If Korean speakers pronounce the word items at the same speaking rate as Japanese speakers, the /s/ and /ts/ distribution might shift closer to the origin, which would result in more /s/→/ts/ errors than the current results.

However, these notions are based on the assumption that speaking rate affects the rise and steady+decay durations. This assumption is probable, but it has not been confirmed. A future study is necessary to determine the effects of speaking rate on these durations.

This study clarified the characteristics of /s/ and /ts/ at a word-initial position, but it did not treat these consonants at a word-medial position. The /s/ and /ts/ at a word-medial position might be easily distinguished because /ts/ has a closure preceding its burst part whereas /s/ does not.

However, /ts/ at a word-medial position may have another problem for Korean speakers because Korean lax affricates at a word-medial position may appear as voiced between voiced sounds but not voiceless (Shin, 2015), although the affricates at a word-initial position always appear as voiceless. In other words, since the Korean language does not distinguish voiceless and voiced lax affricates (Ha et al., 2009), Korean speakers may mispronounce the voiceless affricate /ts/ as a voiced affricate at a word-medial position if they mimic /ts/ with a lax affricate /tɕ/. Moreover, if Korean speakers mimic the /ts/ with a tense affricate /tɕ*/, they might mispronounce it as a geminated affricate because the tense affricate /tɕ*/ has a long closure duration that is the main acoustic feature of the Japanese geminate affricate. For these reasons, Korean speakers might have more trouble pronouncing /ts/ at a word-medial position than at a word-initial position. Considering these points, Korean speakers’ /s/ and /ts/ at a word-medial position should be examined in a future study.

One might suspect that Korean speakers’ pronunciation errors are not perceived as errors by native Japanese speakers because the errors are identified with acoustical features, not perceptually in this study. Although several studies (e.g., Baese-Berk, 2019; Flege & Bohn, 2021) argued a weak or no correlation between speech production and perception, other studies (e.g., Amano & Hirata, 2010; Amano & Hirata, 2015; Denes & Pinson, 1993) claimed that speech production and perception are closely related and the production and perceptual boundaries of phonemes are expected to coincide. According to the expectation, the coincidence of the production and perceptual boundaries has been actually confirmed by experimental studies. For example, Amano & Hirata (2010; Amano & Hirata 2015) conducted an acoustic analysis and perception experiment for Japanese singleton and geminate stops at various speaking rates, and they demonstrated that production and perceptual boundaries of the stops were represented by almost the same lines on the coordinate plane of closure and subword durations. Based on these results, it is highly probable that the Japanese speakers’ production and perceptual boundaries of /s/ and /ts/ are identical. If the boundaries are identical, the Korean speakers’ errors identified by the production boundary should be the same as the errors identified with the perceptual boundary. Therefore, Korean speakers’ pronunciation errors in this study are almost certainly perceived as errors by native Japanese speakers.

If speech production and perception have a close relationship (e.g., Amano & Hirata, 2010; Amano & Hirata, 2010; Amano & Hirata, 2015; Denes & Pinson, 1993), the perception of /s/ and /ts/ may have similar characteristics to their production observed in this study. Namely, Korean speakers might misperceive /ts/ as /s/ more frequently than /s/ as /ts/ as a consequence of a perceptual boundary shift to the origin. This notion should be examined in a future study. However, the examination of the perceptual boundary alone is not enough to clarify the characteristics of perception of /s/ and /ts/. The sensitivity in discriminating these two consonants should also be examined because even if Korean speakers have the same perceptual boundary as Japanese speakers, they can misperceive /s/ and /ts/ because of low sensitivity in discriminating these two consonants. A future study should investigate the relationships between the perception and production of /s/ and /ts/ while paying attention to this point.

When assuming the distributions of phoneme category in production (Figures 24) correspond to those in perception, some implications can be provided for PAM-L2 proposed by Best & Tyler (2007). PAM-L2 distinguishes the following four cases for the perception of L1 and L2 phonological categories:

1. Only one L2 phonological category is perceived as equivalent (perceptually assimilated) to a given L1 phonological category,

2. Both L2 phonological categories are perceived as equivalent to the same L1 phonological category, but one is perceived as being more deviant than the other,

3. Both L2 phonological categories are perceived as equivalent to the same L1 phonological category, but as equally good or poor instances of that category, and

4. No L1-L2 phonological assimilation (Best & Tyler, 2007).

However, none of these cases fit the current relationship between Korean L1 phonemes and Japanese L2 phonemes. Korean speakers perceptually map one L2 phoneme /s/ to two L1 phonemes /s/ and /s*/, and they also map one L2 phoneme /ts/ to two L1 phonemes /tɕ/ and /tɕ*/. Namely, one L2 phonological category is perceived as equivalent to two L1 phonological categories. This is a new case that PAM-L2 should consider.

Perceptual learning of Japanese L2 phonemes would occur as PAM-L2 claims, and the Korean speakers’ boundary would become close to that of Japanese speakers. In that process, two Korean L1 phonemes would affect this perceptual learning. In some sense, the new case is regarded as an extension of case 1 but it is more complicated because there are two L1 phonemes and their interaction is expected. Future investigations are needed to clarify the perception and learning process in the new case, and it would improve PAM-L2.

This study showed that Korean speakers pronounce Japanese /s/ and /ts/ with a bias related to fricatives and affricates in the Korean language. Many languages such as English, Spanish, Thai, and Vietnamese do not have /ts/. Thus, /s/ and /ts/ produced by native speakers of these languages might be affected by the phonemes in their language that are similar to /s/ and /ts/, and these effects may differ according to what phonemes are similar to /s/ and /ts/. These points should be examined in a future study.

## Notes

* This study was supported by JSPS KAKENHI Grant Numbers JP21530782, JP22320081, JP26370464, and JP17K02705. We would like to thank the National Institute of Informatics, NTT Human Interface Laboratories, and Professor Hyunsoon Kim of Hongik University in Seoul for the assistance of recordings.

## References

1.

Amano, S., & Hirata, Y. (2010). Perception and production boundaries between single and geminate stops in Japanese. The Journal of the Acoustical Society of America, 128(4), 2049-2058.

2.

Amano, S., & Hirata, Y. (2015). Perception and production of singleton and geminate stops in Japanese: Implications for the theory of acoustic invariance. Phonetica, 72(1), 43-60.

3.

Amano, S., & Kondo, T. (1999). Nihongo no goitokusei (Lexical properties of Japanese). Tokyo, Japan: Sanseido.

4.

Baese-Berk, M. M. (2019). Interactions between speech perception and production during learning of novel phonemic categories. Attention, Perception, & Psychophysics, 81(4), 981-1005.

5.

Best, C. T., & Tyler, M. D. (2007). Nonnative and second-language speech perception. In O. S. Bohn & M. J. Munro (Eds.), Language experience in second language speech learning: In honor of James Emil Flege (pp. 13-34). Amsterdam, Netherlands: John Benjamins.

6.

Cho, T., Jun, S. A., & Ladefoged, P. (2002). Acoustic and aerodynamic correlates of Korean stops and fricatives. Journal of Phonetics, 30(2), 193-228.

7.

Denes, P. B., & Pinson, E. N. (1993). The speech chain: The physics and biology of spoken language. New York, NY: W.H. Freeman and Company.

8.

Flege, J. E., & Bohn, O. S. (2021). The revised speech learning model (SLM-r). In R. Wayland (Ed.), Second language speech learning: Theoretical and empirical progress (pp. 3-83). Cambridge, UK: Cambridge University Press.

9.

Ha, S., Johnson, C. J., & Kuehn, D. P. (2009). Characteristics of Korean phonology: Review, tutorial, and case studies of Korean children speaking English. Journal of Communication Disorders, 42(3), 163-179.

10.

Kang, K. S. (2000). On Korean fricatives. Speech Sciences, 7(3), 53-68.

11.

Kubozono, H. (2015). Introduction to Japanese phonetics and phonology. In H. Kubozono (Ed.), Handbook of Japanese phonetics and phonology (pp. 1-40). Boston, MA: De Gruyter Mouton.

12.

Matsuzaki, H. (1999). Phonetic education of Japanese for Korean speakers. Journal of the Phonetic Society of Japan, 3, 26-35.

13.

Shin, J. (2015). Vowels and consonants. In L. Brown & J. Yeon (Eds.), The handbook of Korean linguistics (pp. 3-21). Malden, MA: Wiley-Blackwell.

14.

Sukegawa, Y. (1993). Utterance tendency of non-native Japanese speakers: Results of questionnaire survey. Japanese speech and education,Research Report of Grant-in-Aid for Scientific Research on Priority Areas by Ministry of Education, Science and Culture, 187-222.

15.

Yamakawa, K., & Amano, S. (2015). Discrimination of Japanese fricatives and affricates by production boundaries in time and spectral domains: A case study of a female native speaker. Acoustical Science and Technology, 36(4), 296-301.

16.

Yamakawa, K., Amano, S., & Itahashi, S. (2012). Variables to discriminate affricate [ʦ] and fricative [s] at word initial in spoken Japanese words. Acoustical Science and Technology, 33(3), 154-159.

17.

Vance, T. J. (2008). The sounds of Japanese. Cambridge, UK: Cambridge University Press.

18.

Zimmermann, G. N., Price, P. J., & Ayusawa, T. (1984). The production of English /r/ and /l/ by two Japanese speakers differing in experience with English. Journal of Phonetics, 12(3), 187-193.


text:
# Charges in Magnetic Fields from Surfing Physics book

1. May 4, 2017

### alv

• Member advised to use the homework template for posts in the homework sections of PF.
I am a teacher and I can't work this one out. I am trying to answer (a). I have only included the further parts of the question (b, c and d) so you can see why some parts of the question are included.

A single positively charged particle, mass 4.6 x 1027 kg, enters a 4.0 T magnetic field into the page at 2.5 x 106 m/s. The field covers an area of 0.1 m x 0.1 m. It enters at 90 deg, 0.05 m up from the bottom left corner.
(a) Calculate the force on the particle while it is in the field.
(b) Calculate the radius of the path the particle takes in the field.
(c) Calculate the speed with which the particle exits the field.
(d) Where will the particle exit the field?

There is no indication as to what the positive charged particle is. It's too massive for a proton. So I don't know what the charge on it is. I can't see how would be meant to assume that it has the charge of a proton therefore I don't know what the charge is.

I have tried to use F = mv2/r but I don't know the radius.
I could use F = qvB sinθ but as I said, I don't know the charge
I have calculated E from v = E/B so E = vB = 2.5 x 10^6 x 4 = 1 x 10^7 but then I don't know what to do with it.
There is F = BIl sinθ but I don't know what the current is (or length for that matter).

The answer is 1.8 x 10-12 but I don't know how to get it and need to so I can show my students.
Your help would be greatly appreciated.

2. May 4, 2017

### andrevdh

if I assume one elementary charge the answer comes to 1.6 x 10-12 N?

3. May 4, 2017

### cnh1995

The information is insufficient. They should mention the charge on the particle.

Also, the mass of the particle given makes it heavier than the earth. I believe the power of 10 should be -27 instead of +27.

4. May 4, 2017

### daso

If you interpret it as a single positive (elementary) charge on the particle, the answer should be $1.6\times 10^{-12}$ N, as andrevdh wrote. If you don't know the charge nor the trajectory of the particle, it's not possible to calculate the force. And you need the force to calculate the trajectory. But, then, the answer provided is a bit off.

Where did you get E=vB from?

5. May 4, 2017

### Staff: Mentor

"A single positively charged particle" no doubt means a particle with a single positive elementary charge; There's no reason why they would have to specify that a particle is a single particle.

The mass of the particle, assuming that the power of ten is -27 and not 27 as pointed out by @cnh1995, is 2.75 proton masses, which doesn't strike me as corresponding to any one known particle. So presumably it's a fabrication by the problem's author.

It's possible that over time the details of the problem's given values have been changed to "refresh" the problem for reuse. We occasionally see examples like this where an answer-key value is incorrect either due to a typo or because it wasn't updated when the problem was revamped.

I suggest that you make reasonable assumptions and from there do the calculations in detail to show your students. The radius of curvature for a charged particle moving in a magnetic field is a well known calculation and comes up often.

6. May 4, 2017

### alv

Thanks so much for these replies everyone. Much appreciated


text:
# Game class layout help

This topic is 4818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, i'm trying to get my game's class layout setout so I won't have any problems in the future while coding it. What I have so far is these classes: Window: Just creates a window and returns the hwnd. Render: Initialises direct3d, and returns d3dDevice Scene: Right now it just creates a font object, and draws to the screen with the font. I've declared all these classes as global so say in render which needs the hwnd, i can just say window.getHwnd(); this is what my winmain would look like:
int WinMain(...............) {
try {
window.init(); //create window
render.init(); //init direct3d
scene.init(); //init font

ShowWindow(window.gethwnd(), SW_SHOW);
MSG msg;
ZeroMemory(&msg, sizeof(msg));
PeekMessage(&msg, 0, 0, 0, PM_NOREMOVE);

while(msg.message != WM_QUIT) {
if(PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
} else {
render.run(); //just checks if the d3ddevice has been lost
scene.run(); //beginscene, draw font, end scene
}
}
} catch(string e) {
OutputDebugString(e.c_str());
}

return 0;
}

So so far I've tried to just give most classes a run function which is just called inside the winmain loop. But I've got a bit of a problem now. When the d3dDevice is lost I have to reset it like so: -See if device is lost, and can be regain -Release scene's font -Reset render's d3ddevice -Reset scene's font -Start drawing again And I don't want to have the render class calling anyone of scene's functions because that class like the window class are supposed to be reusable, so I want to keep out as much foreign code as possible. So any ideas on how I could change my class layout to incorporate resetting the device in that order I listed above? Thanks ...edit btw I would usually like to keep the winmain's while loop clear of any if's etc, as all that should be done inside the run classes, this i guess is causing a bit of trouble. And if anyone has any better ideas than what iam doing, i would really like to know. thx

• 40
• 15
• 10
• 23
• 10


text:
# Natural log cabin

Calculus Level 5

$\mathscr{E} = \displaystyle \int_{0}^{1} \ln(c) \ln(1-c) \, dc$

If $$\mathscr{E}$$ can be represented in the form $$a - \dfrac{\pi^{b}}{d}$$, where $$a, b, d$$ are positive integers, find $$a + b + d$$.

×


text:
# Ground dipole

Jump to: navigation, search
The U.S. Navy Clam Lake, Wisconsin ELF transmitter in 1982. Sections of the rights of way for the power lines that make up the two crossed ground dipole antennas can be seen passing through the forest at lower left.

In radio communication, a ground dipole,[1] also referred to as an earth dipole antenna, transmission line antenna,[1] and in technical literature as a horizontal electric dipole (HED),[1][2][3] is a huge, specialized type of radio antenna that radiates extremely low frequency (ELF) electromagnetic waves.[4][5] It is the only type of transmitting antenna that can radiate practical amounts of power in the frequency range of 3 Hz to 3 kHz, commonly called ELF waves[5] A ground dipole consists of two ground electrodes buried in the earth, separated by tens to hundreds of kilometers, linked by overhead transmission lines to a power plant transmitter located between them.[1][5] Alternating current electricity flows in a giant loop between the electrodes through the ground, radiating ELF waves, so the ground is part of the antenna. To be most effective, ground dipoles must be located over certain types of underground rock formations.[5] The idea was proposed by U.S. Dept. of Defense physicist Nicholas Christofilos in 1959.[5]

Although small ground dipoles have been used for years as sensors in geological and geophysical research, their only use as antennas has been in a few military ELF transmitter facilities to communicate with submerged submarines. Besides small research and experimental antennas,[5][6] four full-scale ground dipole installations are known to have been constructed; two by the U.S. Navy at Republic, Michigan and Clam Lake, Wisconsin,[2][7][8] one by the Russian Navy on the Kola peninsula near Murmansk, Russia.[8][9][10] and one in India at the INS Kattabomman naval base.[11][12] The U.S. facilities were used between 1985 and 2004 but are now decommissioned.[8]

## Antennas at ELF frequencies

Although the official ITU definition of extremely low frequencies is 3 Hz to 30 Hz, the wider band of frequencies of 3 Hz to 3 kHz with corresponding wavelengths from 100,000 km to 100 km.[1] is used for ELF communication and are commonly called ELF waves.[13] The frequency used in the U.S. and Russian transmitters, about 80 Hz,[1][14] generates waves 3750 km (2300 miles) long,[15][16] roughly one quarter of the Earth's diameter. ELF waves have been used in very few manmade communications systems because of the difficulty of building efficient antennas for such long waves. Ordinary types of antenna (half-wave dipoles and quarter-wave monopoles) cannot be built for such extremely long waves because of their size. A half wave dipole for 80 Hz would be 1162 miles long. So even the largest practical antennas for ELF frequencies are very electrically short, very much smaller than the wavelength of the waves they radiate.[1] The disadvantage of this is that the efficiency of an antenna drops as its size is reduced below a wavelength.[1] An antenna's radiation resistance, and the amount of power it radiates, is proportional to (L/λ)2 where L is its length and λ is the wavelength. So even physically large ELF antennas have very small radiation resistance, and so radiate only a tiny fraction of the input power as ELF waves; most of the power applied to them is dissipated as heat in various ohmic resistances in the antenna.[5] ELF antennas must be tens to hundreds of kilometers long, and must be driven by powerful transmitters in the megawatt range, to produce even a few watts of ELF radiation. Fortunately, the attenuation of ELF waves with distance is so low (1 - 2 dB per 1000 km)[5] that a few watts of radiated power is enough to communicate worldwide.[2]

A second problem stems from the required polarization of the waves. ELF waves only propagate long distances in vertical polarization, with the direction of the magnetic field lines horizontal and the electric field lines vertical.[1] Vertically oriented antennas are required to generate vertically polarized waves. Even if sufficiently large conventional antennas could be built on the surface of the Earth, these would generate horizontally polarized, not vertically polarized waves.

## History

Ground dipole antenna, similar to the U.S. Clam Lake antennas, showing how it works. The alternating current I  is shown flowing in one direction only through the loop for clarity.

In 1958, the realization that ELF waves could penetrate seawater led U.S. physicist Nicholas Christofilos to suggest that the U.S. Navy use them to communicate with submarines.[7][16] The U.S. military researched many different types of antenna for use at ELF frequencies. Cristofilos proposed applying currents to the Earth to create a vertical loop antenna, and it became clear that this was the most practical design.[1][16] The feasibility of the ground dipole idea was tested in 1962 with a 42 km leased power line in Wyoming, and in 1963 with a 176 km prototype wire antenna extending from West Virginia to North Carolina.[5][16]

## How a ground dipole works

A ground dipole functions as an enormous vertically oriented loop antenna[5][17] (see drawing, right). It consists of two widely separated electrodes (G) buried in the ground, connected by overhead transmission cables to a transmitter (P) located between them. The alternating current from the transmitter (I) travels in a loop through one transmission line, kilometers deep into bedrock from one ground electrode to the other, and back through the other transmission line. This creates an alternating magnetic field (H) through the loop, which radiates ELF waves. Due to their low frequency, ELF waves have a large skin depth and can penetrate a significant distance through earth, so it doesn't matter that half the antenna is under the ground. The axis of the magnetic field produced is horizontal, so it generates vertically polarized waves. The radiation pattern of the antenna is directional, a dipole pattern, with two lobes (maxima) in the plane of the loop, off the ends of the transmission lines.[3][5] In the U.S. installations two ground dipoles are used, oriented perpendicular to each other, to allow the beam to be steered in any direction by altering the relative phase of the currents in the antennas.

The amount of power radiated by a loop antenna is proportional to (IA)2, where I is the AC current in the loop and A is the area enclosed,[5] To radiate practical power at ELF frequencies, the loop has to carry a current of hundreds of amperes and enclose an area of at least several square miles.[5] Christofilos found that the lower the electrical conductivity of the underlying rock, the deeper the current will go, and the larger the effective loop area.[2][5] Radio frequency current will penetrate into the ground to a depth equal to the skin depth of the ground at that frequency, which is inversely proportional to the square root of ground conductivity σ. The ground dipole forms a loop with effective area of A = / √2, where L is the total length of the transmission lines and δ is the skin depth.[5][14] So ground dipoles are sited over low conductivity underground rock formations (this contrasts with ordinary radio antennas, which require good earth conductivity for a low resistance ground connection for their transmitters). The two U.S. Navy antennas were located in the Upper Peninsula of Michigan, on the Canadian Shield (Laurentian Shield) formation,[2][18] which has unusually low conductivity of 2×10−4 siemens/meter.[5] resulting in an increase in antenna efficiency of 20 dB.[3] The earth conductivity at the site of the Russian transmitter is even lower.[14]

Because of their lack of civilian applications, little information about ground dipoles is available in antenna technical literature.

## U.S. Navy ELF antennas

Map showing location of the US Navy ELF transmitters. The red lines show the paths of the ground dipole antennas. The Clam Lake facility (left) had two crossed 14 mi. ground dipoles. The Republic facility had two 14 mi. dipoles oriented east-west, and one 28 mi. dipole oriented north-south.

After initially considering several larger systems (Project Sanguine), the U.S. Navy constructed two ELF transmitter facilities, one at Clam Lake, Wisconsin and the other at Republic, Michigan, 145 miles apart.[2][4] They could operate independently, or phase synchronized as one antenna for greater output power.[4] The Clam Lake site, the initial test facility, transmitted its first signal in 1982[4] and began operation in 1985, while the Republic site became operational in 1989. With an input power of 2.6 megawatts, the total radiated ELF output power of both sites working together was 8 watts.[2] However, due to the low attenuation of ELF waves this tiny radiated power was able to communicate with submarines over about half the Earth's surface.[19]

Both transmitters were shut down in 2004.[8][20] The official Navy explanation was that advances in VLF communication systems had made them unnecessary.[8]

## Russian Navy ZEVS antennas

The Russian Navy operates an ELF transmitter facility, named ZEVS ("Zeus"), to communicate with its submarines, located 30 km southeast of Murmansk on the Kola peninsula in northern Russia.[9][10] Signals from it were detected in the 1990s at Stanford University and elsewhere.[10][14] It normally operates at 82 Hz, using MSK (minimum shift keying) modulation.[10] although it reportedly can cover the frequency range from 20 to 250 Hz.[9][14] It reportedly consists of two parallel ground dipole antennas 60 km long, driven at currents of 200 to 300 amperes.[10][14] Calculations from intercepted signals indicate it is 10 dB more powerful than the U.S. transmitters.[14] Unlike them it is used for geophysical research in addition to military communications.[9][10]

## Indian Navy antennas

The Indian Navy has an operational ELF communication facility at the INS Kattabomman naval base, in Tamil Nadu, to communicate with its Arihant class and Akula class submarines.[11][12]

## Radiated power

The total power radiated by a ground dipole is[5]

${\displaystyle P={\frac {\pi ^{2}f^{2}I^{2}L^{2}}{2c^{2}h\sigma }}\,}$

where

f is the frequency
I is the RMS current in the loop
L is the length of the transmission line
c is the speed of light
h is the height above ground of the ionosphere D layer
σ is the ground conductivity

The radiated power of an electrically small loop antenna normally scales with the fourth power of the frequency, but at ELF frequencies the effects of the ionosphere result in a less severe reduction in power proportional to the square of frequency.

## Receiving antennas

Ground dipoles are not needed for reception of ELF signals. Instead, various loop and ferrite coil antennas have been used for reception.

The requirements for receiving antennas at ELF frequencies are far less stringent than transmitting antennas: The signal to noise ratio (SNR) is the limiting factor in all radio reception, and the limiting noise comes both from outside the receiver and from inside the receiver’s own circuitry. The constraint this places on receiving antennas is they must intercept a strong enough signal to stand out from the external and internal background noise.

In ELF receivers noise in the signal is dominated by the large atmospheric noise in the band; Even the tiny signal captured by a small, inefficient receiving antenna contains noise that greatly exceeds the small amount of noise generated in the receiver itself. (Which is actually the case for all frequencies below about 1,500 kHz.) Because the outside noise is what limits reception, very little power from the antenna is needed for the intercepted signal to overwhelm the internal noise, and hence small receive antennas can be used with no disadvantage.

## References

1. Barr, R.; D. Llanwyn Jones; C.J. Rodger (June 14, 2000). "ELF and VLF radio waves" (PDF). Journal of Atmospheric and Solar-Terrestrial Physics. Pergamon. 62: 1689–1718. doi:10.1016/s1364-6826(00)00121-8. Retrieved 2012-02-23., p.1692, on VLF Group website, Stanford Univ.
2. "Extremely Low Frequency Transmitter Site, Clam Lake, Wisconsin" (PDF). Navy Fact File. United States Navy. June 28, 2001. Retrieved February 17, 2012. on Federation of American Scientists website
3. ^ a b c Wolkoff, E. A.; W. A. Kraimer (May 1993). "Pattern Measurements of U.S. Navy ELF Antennas" (PDF). ELF/VLF/LF Radio Propagation and Systems Aspects. Belgium: AGARD Conference proceedings Sept. 28 - Oct. 2, 1992, NATO. pp. 26.1–26.10. Retrieved February 17, 2012.
4. ^ a b c d Altgelt, Carlos. "The World's Largest "Radio" Station". The Broadcaster's Desktop Resource. Barry Mishkind, OldRadio.com website. Retrieved February 17, 2012.
5. Jones, David Llanwyn (July 4, 1985). "Sending signals to submarines". New Scientist. London: Holborn Publishing Group. 26 (1463): 37–41. Retrieved February 17, 2012.
6. ^ Ginzberg, Lawrence H. (April 1974). "Extremely low frequency (ELF) propagation measurements along a 4900 km path" (PDF). IEEE Transactions on Communications. IEEE. COM-22 (4): 452–457. doi:10.1109/tcom.1974.1092218. Retrieved May 14, 2012.
7. ^ a b Coe, Lewis (2006). Wireless Radio: A brief history. USA: McFarland. pp. 143–144. ISBN 0786426624.
8. Sterling, Christopher H. (2008). Military communications: from ancient times to the 21st century. ABC-CLIO. pp. 431–432. ISBN 1851097325.
9. ^ a b c d Bashkuev, Yu. B.; V. B. Khaptanov; A. V. Khankharaev (December 2003). "Analysis of Propagation Conditions of ELF Radio Waves on the "Zeus"–Transbaikalia Path". Radiophysics and Quantum Electronics. Plenum. 46 (12): 909–917. doi:10.1023/B:RAQE.0000029585.02723.11. Retrieved February 17, 2012.
10. Jacobsen, Trond (2001). "ZEVS, The Russian 82 Hz ELF Transmitter". Radio Waves Below 22 kHz. Renato Romero webpage. Retrieved February 17, 2012.
11. ^ a b Hardy, James (28 February 2013). "India makes headway with ELF site construction". Jane's Information Group, IHS Jane's Defence Weekly. Archived from the original on 23 February 2014. Retrieved 23 February 2014.
12. ^ a b
13. ^ Liemohn, Michael W. and A. A. Chan, "Unraveling the Causes of Radiation Belt Enhancements". EOS, Transactions, American Geophysical Union, Volume 88, Number 42, 16 October 2007, pages 427-440. Republished by NASA and accessed online, 18 November 2015.
14. Fraser-Smith, Anthony C.; Peter R. Bannister (1998). "Reception of ELF signals at antipodal distances" (PDF). Radio Science. USA: American Geophysical Union. 33 (1): 83–88. Bibcode:1998RaSc...33...83F. doi:10.1029/97RS01948. Retrieved 2012-05-14.
15. ^ λ = c/f = 3×108 m/s / 80 Hz = 3750 km
16. ^ a b c d Sullivan, Walter (October 13, 1981). "How huge antenna can broadcast into the silence of the sea". The New York Times. USA: The New York Times Co. Retrieved May 22, 2012.
17. ^ Sueker, Keith H. (2005). Power Electronics Design: A Practitioner's Guide. Elsevier. pp. 221–222. ISBN 0750679271.
18. ^ Heppenheimer, T. A. (April 1987). "Signaling Subs". Popular Science. New York: Times Mirror Magazines. 230 (4): 44–48. Retrieved February 17, 2012.
19. ^ Blair, Bruce G. (1985). Strategic Command and Control: Redefining the Nuclear Threat. Brookings Institution Press. pp. 269–270. ISBN 0815709811.
20. ^ Cohen-Joppa, Felice (October 15, 2004). "Project ELF Closes". The Nuclear Resistor, Issue 135. Felice and Jack Cohen-Joppa. Retrieved February 17, 2012.


text:
### Roach00's blog

By Roach00, history, 15 months ago,

This is the problem https://codeforces.com/contest/977/problem/F

These are the two solutions :

The one line change is during input taking iteration where I am assigning value to dp[a[i]]. first I assigned dp[a[i]] = 1 , which gave wrong answer at large input(so can't debug by myself) but then when I changed it to dp[a[i]] = 0 , it made the solution accepted , but if you will see just next interation after the input taking iteration , it doesn't make sense to me because dp[a[i]] = max(dp[a[i]] , dp[a[i] — 1] + 1) should take care of the dp[a[i]] = 1. I don't know am I missing something?