# Create a custom marker

**URL:** <https://forum.techsoft3d.com/t/create-a-custom-marker/4993>\
**Category:** HOOPS Visualize Desktop\
**Tags:** how-to\
**Created:** [November 5, 2025, 6:32am UTC](https://forum.techsoft3d.com/t/create-a-custom-marker/4993 "2025-11-05T06:32:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amaan.makhani](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@amaan.makhani](https://forum.techsoft3d.com/u/amaan.makhani)\
**Post date:** [November 5, 2025, 6:32am UTC](https://forum.techsoft3d.com/t/create-a-custom-marker/4993/1 "2025-11-05T06:32:42Z")

</div>

Hey,

I am looking to make a custom marker of multiple \>, that could be \>\> or \>\>\>. I wrote the following code, and it seems to work, but the markers come out as circles. What am I doing wrong?

```c
HPS::GlyphPoint ConvertToGlyphPt( std::vector<double> const& point )
{
  HPS::GlyphPoint glyphPoint;
  auto normalizedPt = NormalizePoint( point );
  glyphPoint.x = normalizedPt.x;
  glyphPoint.y = normalizedPt.y;
  return glyphPoint;
}

void InsertArrows( COLORREF color,
                   int lineStyle,
                   std::vector<Arrowhead> const& arrowheads )
{
  if( arrowheads.empty() )
  {
    return;
  }

  HPS::SegmentKey childSegmentKey = plot.Subsegment( "Arrowheads" ).Subsegment();

  CStringA glyphName {};
  glyphName.Format( "arrowhead_%zu", arrowheads.size() );  
  if( !m_portfolio.ShowGlyphDefinition( glyphName.GetString() ) )
  {
    HPS::GlyphKit glyphBuilder {};
    glyphBuilder.SetRadius( 0 );
    glyphBuilder.SetOffset( { 0, 0 } );
    HPS::LineGlyphElement arrows {};
    HPS::PointArray pointArray;

    HPS::GlyphPointArray points {};
    for( auto i { 0 }; i < arrowheads.size(); ++i )
    {
      points.push_back( ConvertToGlyphPt( arrowheads[i].center ) );
      points.push_back( ConvertToGlyphPt( arrowheads[i].legOne ) );
      points.push_back( ConvertToGlyphPt( arrowheads[i].center ) );
      points.push_back( ConvertToGlyphPt( arrowheads[i].legTwo ) );
      points.push_back( ConvertToGlyphPt( arrowheads[i].center ) );
      if( i != arrowheads.size() - 1 )
      {
        points.push_back( ConvertToGlyphPt( arrowheads[i + 1].center ) );
      }
    }
    arrows.SetPoints( points );
    glyphBuilder.SetElement( arrows );
    m_portfolio.DefineGlyph( glyphName.GetString(), glyphBuilder );
  }

  childSegmentKey.GetMarkerAttributeControl().SetSymbol( glyphName.GetString() );
  childSegmentKey.GetMaterialMappingControl().SetMarkerColor( COLORREF2RGB( color ) );
  childSegmentKey.GetMarkerAttributeControl().SetSize( 20, HPS::Marker::SizeUnits::Pixels );

  HPS::Vector translationVector {};
  msl::XYZPoint<double> normalizedCenter {};
  NormalizeToCurrentWindow( arrowheads[0].center, normalizedCenter, translationVector );

  HPS::MatrixKit childSegmentMatrix;
  childSegmentMatrix.Translate( translationVector );
  childSegmentKey.SetModellingMatrix( childSegmentMatrix );

  childSegmentKey.InsertMarker( HPS::Point( normalizedCenter.x,
                                            normalizedCenter.y,
                                            normalizedCenter.z ) );
}

```

---

<div class="post-metadata">

**Author:** ![mike](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/mike/32/228_2.png) [@mike](https://forum.techsoft3d.com/u/mike)\
**Post date:** [November 5, 2025, 10:08pm UTC](https://forum.techsoft3d.com/t/create-a-custom-marker/4993/2 "2025-11-05T22:08:04Z")

</div>

After a quick review of your code, you should set the radius \> 0. The value doesn’t refer exclusively to a circle but specifies the drawing canvas size for the glyph (cf. [Glyphs — HOOPS Visualize Desktop Documentation](https://docs.techsoft3d.com/hoops/visualize-desktop/prog_guide/0405_glyphs.html#step-2-set-the-glyph-canvas)). You might check your implementation against the other steps under Custom Glyphs in the linked documentation.

Hope this helps.

Mike
