## Compare Cardinal Spline and Uniform Cubic Spline

Uniform Cubic Spline To Smooth Segments Change input points and use the Cubic piecewise function introduced in Basic functions for B-Spline to create smooth curve. The left renderer shows polygon lines through original points, and the right one is the smooth curve generated by algorithm. Cardinal Spline To Smooth Segments Read more…

## Basic functions for B-Spline

Uniform Cubic Spline Piecewise function: The cubic spline graph: Test code: #include <vtkActor.h> #include <vtkCleanPolyData.h> #include <vtkDistancePolyDataFilter.h> #include <vtkNamedColors.h> #include <vtkNew.h> #include <vtkPointData.h> #include <vtkPolyDataMapper.h> #include <vtkPolyDataReader.h> #include <vtkProperty.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkRenderer.h> #include <vtkScalarBarActor.h> #include <vtkSmartPointer.h> #include <vtkSphereSource.h> #include <vtkSTLReader.h> #include <vtkTransform.h> #include <vtkMatrix4x4.h> #include <vector> #include Read more…

## Bézier Curves

Bézier Curves Bézier curves are a type of parametric curve that is widely used in computer graphics, computer-aided design, and various other fields for creating smooth, elegant curves. They are named after the French engineer Pierre Bézier, who developed the mathematics behind these curves while working at Renault in the Read more…

## Use Multiplication Of Matrices To Simulate vtkTransformFilter + vtkTransform Rotate Process

As we know, vtkTransformFilter can change points’ positions and rewrite data. Then we use vtkTransform object to do linear transform for 3D model. This process is not equal to the multiplication of these two matrices. We can deduce the event in our online tool: 3D Model Editor.Open module linear transform tester. We Read more…

## Check Point Inside Circle On Screen

This article is a sequel to the previous one https://www.weiy.city/2023/04/draw-a-circle-around-mouse-postion-on-screen/. Let’s check if the vertex of cone is inside the red circle when we move mouse. CustomIteractorStyle.cpp UPaintBrush.cpp UPaintBrush.h Output:

## Use Alpha Blend Algorithm To Simulate Image Layer Overlap

This post is based on an old project Use ITK And VTK To Show DICOM Image. We want to add an above layer which drawed translucent red color on the gray image. Use alpha blend algorithm to merge two different color: origin color = \$(R_1, G_1, B_1, 255)\$ canvas color Read more…

## Use Lapack In Eigen To Compute SVD In CPP Project

OS: Ubuntu 22.04.2 LTS. Download eigen from website: https://eigen.tuxfamily.org/index.php?title=Main_Page Small Eigen Project Write a file main.cpp which use eigen library. Build and run it. Use Lapack In Eigen In C++ Project Write test code to use lapack, build and run the project. Create a file matrix.txt Run the executable file by Read more…

## New Tool – Compound Interest

We create a new tool compound interest calculator. Input your investment plan, our tool will draw the money growing scene in the future. Tool: Youtube Bilibili

## The Relationship Between 3D Coordinate Value XYZ And 2D Texture Coordinate UVR

We will introduce the transformation equation for 3D Coordinate Value XYZ And 2D Texture Coordinate UVR. Try to represent the UVR value by x,y, and z. Here is derivation process.                                     Because U Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X