Skip to content
Permalink
Browse files

First commit

  • Loading branch information...
davreev committed Dec 7, 2015
0 parents commit 289e1b1d9257088ac9a9e35345dd491256b94978
Showing with 28,101 additions and 0 deletions.
  1. +63 −0 .gitattributes
  2. +189 −0 .gitignore
  3. +22 −0 SpatialSlur.sln
  4. BIN SpatialSlur.v11.suo.doc
  5. BIN SpatialSlur.v12.suo(2)(2).doc
  6. BIN SpatialSlur.v12.suo(2)(3).doc
  7. BIN SpatialSlur.v12.suo(2).doc
  8. BIN SpatialSlur.v12.suo(3).doc
  9. BIN SpatialSlur.v12.suo.doc
  10. +37 −0 SpatialSlur/Properties/AssemblyInfo.cs
  11. +31 −0 SpatialSlur/SlurCore/DisplayUtil.cs
  12. +401 −0 SpatialSlur/SlurCore/Domain.cs
  13. +393 −0 SpatialSlur/SlurCore/Domain2d.cs
  14. +411 −0 SpatialSlur/SlurCore/Domain3d.cs
  15. +142 −0 SpatialSlur/SlurCore/DotNetExtensions.cs
  16. +246 −0 SpatialSlur/SlurCore/GeometryUtil.cs
  17. +521 −0 SpatialSlur/SlurCore/IListExtensions.cs
  18. +330 −0 SpatialSlur/SlurCore/RhinoExtensions.cs
  19. +284 −0 SpatialSlur/SlurCore/RhinoUtil.cs
  20. +493 −0 SpatialSlur/SlurCore/SlurMath.cs
  21. +531 −0 SpatialSlur/SlurCore/Vec2d.cs
  22. +306 −0 SpatialSlur/SlurCore/Vec2i.cs
  23. +299 −0 SpatialSlur/SlurCore/Vec2i[Conflict].cs
  24. +692 −0 SpatialSlur/SlurCore/Vec3d.cs
  25. +339 −0 SpatialSlur/SlurCore/Vec3i.cs
  26. +48 −0 SpatialSlur/SlurData/CompareKd.cs
  27. +174 −0 SpatialSlur/SlurData/PriorityQueueT.cs
  28. +72 −0 SpatialSlur/SlurData/RhinoExtensions.cs
  29. +220 −0 SpatialSlur/SlurData/Spatial2dT.cs
  30. +229 −0 SpatialSlur/SlurData/Spatial3dT.cs
  31. +129 −0 SpatialSlur/SlurData/SpatialGrid2dT.cs
  32. +152 −0 SpatialSlur/SlurData/SpatialGrid3dT.cs
  33. +76 −0 SpatialSlur/SlurData/SpatialHash2dT.cs
  34. +80 −0 SpatialSlur/SlurData/SpatialHash3dT.cs
  35. +1,007 −0 SpatialSlur/SlurData/TreeKdT.cs
  36. +487 −0 SpatialSlur/SlurData/VecKd.cs
  37. +293 −0 SpatialSlur/SlurField/DynamicMeshScalarField.cs
  38. +598 −0 SpatialSlur/SlurField/DynamicScalarField2d.cs
  39. +728 −0 SpatialSlur/SlurField/DynamicScalarField3d.cs
  40. +593 −0 SpatialSlur/SlurField/Field2d.cs
  41. +403 −0 SpatialSlur/SlurField/Field2dT.cs
  42. +670 −0 SpatialSlur/SlurField/Field3d.cs
  43. +437 −0 SpatialSlur/SlurField/Field3dT.cs
  44. +20 −0 SpatialSlur/SlurField/FieldBoundaryType.cs
  45. +215 −0 SpatialSlur/SlurField/FieldIO.cs
  46. +91 −0 SpatialSlur/SlurField/FieldPoint2d.cs
  47. +97 −0 SpatialSlur/SlurField/FieldPoint3d.cs
  48. +147 −0 SpatialSlur/SlurField/ImplicitSurfaces.cs
  49. +744 −0 SpatialSlur/SlurField/Isosurface.cs
  50. +173 −0 SpatialSlur/SlurField/MeshField.cs
  51. +176 −0 SpatialSlur/SlurField/MeshFieldT.cs
  52. +404 −0 SpatialSlur/SlurField/MeshScalarField.cs
  53. +180 −0 SpatialSlur/SlurField/MeshVectorField.cs
  54. +229 −0 SpatialSlur/SlurField/PerlinNoise.cs
  55. +110 −0 SpatialSlur/SlurField/RhinoExtensions.cs
  56. +779 −0 SpatialSlur/SlurField/ScalarField2d.cs
  57. +843 −0 SpatialSlur/SlurField/ScalarField3d.cs
  58. +391 −0 SpatialSlur/SlurField/SimplexNoise.cs
  59. +594 −0 SpatialSlur/SlurField/VectorField2d.cs
  60. +523 −0 SpatialSlur/SlurField/VectorField3d.cs
  61. +84 −0 SpatialSlur/SlurGraph/DiGraph.cs
  62. +97 −0 SpatialSlur/SlurGraph/Edge.cs
  63. +93 −0 SpatialSlur/SlurGraph/Graph.cs
  64. +305 −0 SpatialSlur/SlurGraph/GraphBase.cs
  65. +244 −0 SpatialSlur/SlurGraph/GraphUtil.cs
  66. +112 −0 SpatialSlur/SlurGraph/IGraph.cs
  67. +126 −0 SpatialSlur/SlurGraph/Node.cs
  68. +198 −0 SpatialSlur/SlurMesh/GhExtensions.cs
  69. +327 −0 SpatialSlur/SlurMesh/HeEdge.cs
  70. +966 −0 SpatialSlur/SlurMesh/HeEdgeList.cs
  71. +58 −0 SpatialSlur/SlurMesh/HeElement.cs
  72. +197 −0 SpatialSlur/SlurMesh/HeElementList.cs
  73. +260 −0 SpatialSlur/SlurMesh/HeFace.cs
  74. +1,526 −0 SpatialSlur/SlurMesh/HeFaceList.cs
  75. +611 −0 SpatialSlur/SlurMesh/HeMesh.cs
  76. +2,021 −0 SpatialSlur/SlurMesh/HePhysics.cs
  77. +518 −0 SpatialSlur/SlurMesh/HeSubdivide.cs
  78. +271 −0 SpatialSlur/SlurMesh/HeVertex.cs
  79. +1,341 −0 SpatialSlur/SlurMesh/HeVertexList.cs
  80. +272 −0 SpatialSlur/SlurMesh/RhinoExtensions.cs
  81. +158 −0 SpatialSlur/SlurSketch/PointGrid.cs
  82. +163 −0 SpatialSlur/SlurSketch/PointLattice.cs
  83. +21 −0 SpatialSlur/SlurSketch/Test.cs
  84. +80 −0 SpatialSlur/SlurSketch/TwistedBox.cs
  85. +71 −0 SpatialSlur/SlurSketch/TwistedQuad.cs
  86. +139 −0 SpatialSlur/SpatialSlur.csproj
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
@@ -0,0 +1,189 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

# Roslyn cache directories
*.ide/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

#NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
#*.pubxml

# NuGet Packages Directory
packages/*
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpatialSlur", "SpatialSlur\SpatialSlur.csproj", "{B57AF965-5201-4215-8077-50B3CC8B1F6B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B57AF965-5201-4215-8077-50B3CC8B1F6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B57AF965-5201-4215-8077-50B3CC8B1F6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B57AF965-5201-4215-8077-50B3CC8B1F6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B57AF965-5201-4215-8077-50B3CC8B1F6B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SpatialSlur")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SpatialSlur")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("11db2625-f1c7-4fca-a7d3-f8ac93f99c8a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;


namespace SpatialSlur.SlurCore
{
public static class DisplayUtil
{
/// <summary>
///
/// </summary>
/// <param name="colors"></param>
/// <param name="t"></param>
/// <returns></returns>
public static Color LerpSpectrum(IList<Color> colors, double t)
{
int last = colors.Count - 1;
t *= last;
int i = (int)Math.Floor(t);

if (i < 0) return colors[0];
else if (i >= last) return colors[last];

return colors[i].LerpTo(colors[i + 1], t - i);
}
}
}

0 comments on commit 289e1b1

Please sign in to comment.
You can’t perform that action at this time.