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

  • Home
  • SEARCH
  • 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 9261125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:04:33+00:00 2026-06-18T13:04:33+00:00

I am a novice programmer, learning C++. I am doing a computational biology project

  • 0

I am a novice programmer, learning C++. I am doing a computational biology project where I represent cells as particles. I have already made a class Cell where I track x and y positions, velocities and accelerations.

I have one question with 2 points:
1) Right now, I only track the center of mass of my cells, so it’s just points. But, I will need to make elongated particles with the same edge for all of them (the cells will all be the same). I cannot think of a way to initialize a fixed edge that will be at the middle of my center of mass and track it for every time step (also to make the edge “follow” my center of mass) with “simple” C++ code (meaning my current knowledge).
My particles should look like this.

My visualization right now is kind of stupid…I export the coordinates of the points in files for every time-step, then I made a script to generate PNGs for every time step using gnuplot and generate a video out of the PNGs, using ffmpeg. This leads to my actual question.

2) To address the first point, I realize that I need a better visualization method. I have looked into OpenGL and other possible methods to do this, but I feel kind of lost. Also, having a direct visualization method, without having to output to files would be faster I guess. Although speed has not been an issue for me at least up to now.

I am under Windows, using Visual Studio 2010.

  • 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-06-18T13:04:34+00:00Added an answer on June 18, 2026 at 1:04 pm

    As far as representing the particles, it looks like you can use a line. One way to do this is to use the endpoints A = (x1, y1) and B = (x2, y2). Then the “center of gravity” is just the midpoint M = ((x1 + x2) / 2, (y1 + y2) / 2).

    Using this representation will make it quite easy for the visualization. OpenGL has direct support for drawing lines given the endpoints.

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

Sidebar

Related Questions

I am a novice programmer and as a part of my project I have
I'll admit I'm a novice programmer and really the only experience I have is
I am a novice programmer. Already night trying to solve the problem, but did
I am a novice programmer learning how to design API for my module. I
I'm an extremely novice programmer who finds himself tasked with learning how to program
Hello Stack Overflow community, I'm a rather novice coder, but I have a project
I am a novice programmer when it comes to Java, I have Java:How To
As a novice C++ programmer I have always put my classes interface in .h
I am a novice programmer and I recently started learning Algorithm and DS. I
I'm a novice programmer with basic Java experience, and currently learning Python. I've stumbled

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.