Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1036715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:44:58+00:00 2026-05-16T14:44:58+00:00

I have a C# program that uses a production grammar to generate 3D models

  • 0

I have a C# program that uses a production grammar to generate 3D models of trees and flowers and similar organic entities (see wikipedia entry for more info on L-Systems) – when I’m generating a large tree with leaves, I (expectedly) get exponential growth in the string that would go up to 100’s of gigs if I’d let it (and I’d like to).

Constraints – I have to do this (sort of) in C# – the C++/native side is busy compiling and rendering the rather immense geometry that’s produced.

So StringBuilder is right out — even if it could handle it, I don’t have enough memory!

I don’t want to do a pure file based solution – waaaaaayyyyyyyy toooooooooooo sloooooooooooowwww!

I can’t change the grammar – I realize I could compress the standard L-Systems notation, but it’s a context sensitive grammar, so once you’ve got it working, you become positively superstitious about fiddling with it.

Things I’ve considered

Memory mapped files – I don’t mind using P/Invoke to get to the native layer to support things, I just don’t want to rewrite the whole production system in C++ – but I haven’t found much in the way of handy libraries for C# to access this functionality

Low level mucking about with memory management/page faulting, etc – but hey, if I did that I might as well sell it as a product – makes the slow pure file based solution not look like such a bad idea

Anybody got any ideas here ? How do I effeciently traverse/manipulate/expand multigig strings produced by a production grammar ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:44:59+00:00Added an answer on May 16, 2026 at 2:44 pm

    You’re quite right that the typical approach to compression involves the notion of a pre-existing plaintext. What I’m talking about here is something like the idea of using a trie data structure as opposed to a dictionary. It’s not just about passively compressing, but rather using an inherently more compact representation that encodes the redundancies implicitly. If you’re at the 100G mark today, you’re within an order of magnitude of bursting past the limits of affordable hard drives, so you might benefit from rethinking the solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.