Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto committed Jan 15, 2025
1 parent 3ade56a commit a199111
Show file tree
Hide file tree
Showing 31 changed files with 1,836 additions and 1,085 deletions.
4 changes: 2 additions & 2 deletions CSManager/CSManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.12.6.2341</AssemblyVersion>
<FileVersion>2024.12.6.2341</FileVersion>
<AssemblyVersion>2025.1.15.0516</AssemblyVersion>
<FileVersion>2025.1.15.0516</FileVersion>
<ApplicationIcon>App.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>
Expand Down
13 changes: 5 additions & 8 deletions Crystallography.Controls/Crystal/PoleFigureControl2.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions Crystallography.Controls/Crystal/PoleFigureControl2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using V3 = OpenTK.Vector3d;
using V4 = OpenTK.Vector4d;
using V3 = OpenTK.Mathematics.Vector3d;
using V4 = OpenTK.Mathematics.Vector4d;

namespace Crystallography.Controls;

Expand Down Expand Up @@ -123,6 +123,7 @@ private void GeneratePixels()
}

//ベクトルからPixelのインデックスを計算するファンクション
//iが放射方向、jが円周に沿った方向
var f = new Func<V3, (int i, int j)>(v =>
{
v.Normalize();
Expand Down Expand Up @@ -202,7 +203,7 @@ public void DrawDensity(Graphics g, double[][] pixels)
if (pixels == null) return;
var max = pixels.Max(e => e.Max());
var min = pixels.Min(e => e.Min());
label1.Text = "Max: " + max.ToString("g5") + "; Min: " + min.ToString("g5");
label1.Text = $"Max: {max:g5}; Min: {min:g5}";

var scale = comboBoxColor.SelectedIndex == 0 ? PseudoBitmap.ColorScaleColdWarmLiner : PseudoBitmap.ColorScaleGrayLiner;

Expand All @@ -214,8 +215,10 @@ public void DrawDensity(Graphics g, double[][] pixels)
int density = Math.Min(65535, Math.Max((int)(val * 65535), 0));

g.FillPie(new SolidBrush(Color.FromArgb(scale[density].R, scale[density].G, scale[density].B)),
-(i + 1.0) / pixels.Length, -(i + 1.0) / pixels.Length, (i + 1.0) / pixels.Length * 2, (i + 1.0) / pixels.Length * 2,
-(double)j / pixels[i].Length * 360.0, 1.0 / pixels[i].Length * 360.0);
-(i + 1.0) / pixels.Length, -(i + 1.0) / pixels.Length,
(i + 1.0) / pixels.Length * 2, (i + 1.0) / pixels.Length * 2,
-(double)(j + 1) / pixels[i].Length * 360.0,
1.0 / pixels[i].Length * 360.0);
}
}

Expand Down
199 changes: 0 additions & 199 deletions Crystallography.Controls/Crystal/PoleFigureControl2.ja.resx

This file was deleted.

Loading

0 comments on commit a199111

Please sign in to comment.