<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: i am looking into the ray tracing from  a source to 45 degree glass and goes to</title>
		<link>http://www.k-wave.org/forum/topic/i-am-looking-into-the-ray-tracing-from-a-source-to-45-degree-glass-and-goes-to</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:31:50 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/i-am-looking-into-the-ray-tracing-from-a-source-to-45-degree-glass-and-goes-to" rel="self" type="application/rss+xml" />

		<item>
			<title>kamaljnawali on "i am looking into the ray tracing from  a source to 45 degree glass and goes to"</title>
			<link>http://www.k-wave.org/forum/topic/i-am-looking-into-the-ray-tracing-from-a-source-to-45-degree-glass-and-goes-to#post-5378</link>
			<pubDate>Thu, 04 Feb 2016 05:35:24 +0000</pubDate>
			<dc:creator>kamaljnawali</dc:creator>
			<guid isPermaLink="false">5378@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks Anthony for the correction.&#60;/p&#62;
&#60;p&#62;Kamal
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anthony on "i am looking into the ray tracing from  a source to 45 degree glass and goes to"</title>
			<link>http://www.k-wave.org/forum/topic/i-am-looking-into-the-ray-tracing-from-a-source-to-45-degree-glass-and-goes-to#post-5377</link>
			<pubDate>Wed, 03 Feb 2016 17:24:03 +0000</pubDate>
			<dc:creator>Anthony</dc:creator>
			<guid isPermaLink="false">5377@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;It is not a k-wave error, I think it comes from these lines :&#60;/p&#62;
&#60;p&#62;medium.density = 1000*ones(Nx, Ny); % [kg/m^3]&#60;br /&#62;
medium.sound_speed = zeros(Ny, Nx);&#60;/p&#62;
&#60;p&#62;As Nx and Ny are not equal, you can't permute them like this.&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
Anthony
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kamaljnawali on "i am looking into the ray tracing from  a source to 45 degree glass and goes to"</title>
			<link>http://www.k-wave.org/forum/topic/i-am-looking-into-the-ray-tracing-from-a-source-to-45-degree-glass-and-goes-to#post-5374</link>
			<pubDate>Wed, 03 Feb 2016 00:36:45 +0000</pubDate>
			<dc:creator>kamaljnawali</dc:creator>
			<guid isPermaLink="false">5374@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;sensor&#60;/p&#62;
&#60;p&#62;I am having the problem of Error using  .*&#60;br /&#62;
Matrix dimensions must agree.&#60;/p&#62;
&#60;p&#62;Error in kspaceFirstOrder2D (line 740)&#60;br /&#62;
                p = c.^2.*(rhox + rhoy);&#60;/p&#62;
&#60;p&#62;Error in practice (line 57)&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);%,input_args{:});&#60;/p&#62;
&#60;p&#62;Here is my code&#60;/p&#62;
&#60;p&#62;% define literals&#60;br /&#62;
clear all;close all&#60;br /&#62;
PML_X_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 10;            % [grid points]&#60;br /&#62;
% set total number of grid points not including the PML&#60;br /&#62;
Nx = 128 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 128 - 2*PML_Y_SIZE;     % [grid points]&#60;br /&#62;
% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 40e-3;                  % [m]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = x/Nx;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;/p&#62;
&#60;p&#62;% create the k-space grid&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;line_size = 80;&#60;br /&#62;
line_x_pos = 15;&#60;br /&#62;
line_y_pos = 5;&#60;br /&#62;
line_sound_speed = 3000;&#60;br /&#62;
water_sound_speed = 1500;&#60;br /&#62;
medium.density = 1000*ones(Nx, Ny);             % [kg/m^3]&#60;br /&#62;
% create medium&#60;br /&#62;
medium.sound_speed = zeros(Ny, Nx);&#60;br /&#62;
medium.sound_speed(line_y_pos:line_y_pos + line_size - 1, ...&#60;br /&#62;
    line_x_pos:line_x_pos + line_size - 1) ...&#60;br /&#62;
    = diag(ones(1,line_size))+diag(ones(1,line_size-1),-1)+diag(ones(1,line_size-1),1);% look individually upon this part&#60;br /&#62;
% very important to find the difference. test size(diag(ones(1,52)))&#60;br /&#62;
% and diag(ones(1,51),-1)&#60;/p&#62;
&#60;p&#62;medium.sound_speed(medium.sound_speed == 1) = line_sound_speed;&#60;br /&#62;
medium.sound_speed(medium.sound_speed == 0) = water_sound_speed;&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
t_end = 40e-6;                  % [s]&#60;br /&#62;
kgrid.t_array = makeTime(kgrid, medium.sound_speed, [], t_end);&#60;br /&#62;
source.p_mask = makeDisc(Nx, Ny, round(25e-3/dx), Ny/2, 3);&#60;br /&#62;
source_strength = 1e6;          % [Pa]&#60;br /&#62;
input_freq = 0.5e6;        % [Hz]&#60;br /&#62;
input_signal=sin(input_freq*2*pi*kgrid.t_array);&#60;br /&#62;
source.p = source_strength*input_signal;&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;br /&#62;
sensor.mask = zeros(Nx, Ny);&#60;br /&#62;
sensor.mask(Nx/4, Ny/6) = 1;&#60;/p&#62;
&#60;p&#62;sensor.record = {'p', 'p_final'};&#60;/p&#62;
&#60;p&#62;display medium&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(medium.sound_speed);&#60;br /&#62;
axis image;&#60;br /&#62;
colorbar;&#60;/p&#62;
&#60;p&#62;sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);%,input_args{:});&#60;/p&#62;
&#60;p&#62;% display medium&#60;br /&#62;
%figure;&#60;br /&#62;
%imagesc(medium.sound_speed);&#60;br /&#62;
% axis image;&#60;br /&#62;
% colorbar;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
